Author: hbelusca
Date: Tue Jun 20 23:29:54 2017
New Revision: 75159
URL:
http://svn.reactos.org/svn/reactos?rev=75159&view=rev
Log:
[CMLIB]: Use the generic allocator functions, and fix build.
Modified:
trunk/reactos/sdk/lib/cmlib/cmlib.h
trunk/reactos/sdk/lib/cmlib/hivecell.c
Modified: trunk/reactos/sdk/lib/cmlib/cmlib.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/cmlib/cmlib.h?rev=…
==============================================================================
--- trunk/reactos/sdk/lib/cmlib/cmlib.h [iso-8859-1] (original)
+++ trunk/reactos/sdk/lib/cmlib/cmlib.h [iso-8859-1] Tue Jun 20 23:29:54 2017
@@ -722,13 +722,13 @@
IN SIZE_T Size,
IN BOOLEAN Paged,
IN ULONG Tag
- );
+);
VOID
NTAPI
CmpFree(
IN PVOID Ptr,
IN ULONG Quota
- );
+);
#endif /* _CMLIB_H_ */
Modified: trunk/reactos/sdk/lib/cmlib/hivecell.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/cmlib/hivecell.c?r…
==============================================================================
--- trunk/reactos/sdk/lib/cmlib/hivecell.c [iso-8859-1] (original)
+++ trunk/reactos/sdk/lib/cmlib/hivecell.c [iso-8859-1] Tue Jun 20 23:29:54 2017
@@ -569,7 +569,9 @@
if (CellRef->Count == CellRef->Max)
{
/* Allocate a new reference table */
- NewCellArray = ExAllocatePoolWithTag(PagedPool, (CellRef->Max +
CELL_REF_INCREMENT) * sizeof(HV_HIVE_CELL_PAIR), TAG_CM);
+ NewCellArray = CmpAllocate((CellRef->Max + CELL_REF_INCREMENT) *
sizeof(HV_HIVE_CELL_PAIR),
+ TRUE,
+ TAG_CM);
if (!NewCellArray)
{
DPRINT1("HvTrackCellRef: Cannot reallocate the reference
table.\n");
@@ -585,7 +587,7 @@
RtlCopyMemory(NewCellArray,
CellRef->CellArray,
CellRef->Max * sizeof(HV_HIVE_CELL_PAIR));
- ExFreePoolWithTag(CellRef->CellArray, TAG_CM);
+ CmpFree(CellRef->CellArray, 0); // TAG_CM
}
CellRef->CellArray = NewCellArray;
CellRef->Max += CELL_REF_INCREMENT;
@@ -643,7 +645,7 @@
}
/* We can reuse the dynamic array */
- ExFreePoolWithTag(CellRef->CellArray, TAG_CM);
+ CmpFree(CellRef->CellArray, 0); // TAG_CM
CellRef->CellArray = NULL;
CellRef->Count = CellRef->Max = 0;
}