diff --git a/reactos/ntoskrnl/cm/cm.h b/reactos/ntoskrnl/cm/cm.h index 0af16c03990..215f4c69fe3 100644 --- a/reactos/ntoskrnl/cm/cm.h +++ b/reactos/ntoskrnl/cm/cm.h @@ -461,4 +461,8 @@ static __inline HCELL_INDEX xHvAllocateCell(char *file, int line, PREGISTRY_HIVE #define HvAllocateCell(hive, size) xHvAllocateCell(__FILE__, __LINE__, hive, size) #endif +// Some Ob definitions for debug messages in Cm +#define ObGetObjectPointerCount(x) OBJECT_TO_OBJECT_HEADER(x)->PointerCount +#define ObGetObjectHandleCount(x) OBJECT_TO_OBJECT_HEADER(x)->HandleCount + #endif /*__INCLUDE_CM_H*/ diff --git a/reactos/ntoskrnl/cm/ntfunc.c b/reactos/ntoskrnl/cm/ntfunc.c index 4f4e0a58b1f..7c93079c97b 100644 --- a/reactos/ntoskrnl/cm/ntfunc.c +++ b/reactos/ntoskrnl/cm/ntfunc.c @@ -638,7 +638,7 @@ NtDeleteKey(IN HANDLE KeyHandle) ExReleaseResourceLite(&CmiRegistryLock); KeLeaveCriticalRegion(); - //DPRINT("PointerCount %lu\n", ObGetObjectPointerCount((PVOID)KeyObject)); + DPRINT("PointerCount %lu\n", ObGetObjectPointerCount((PVOID)KeyObject)); /* Remove the keep-alive reference */ ObDereferenceObject(KeyObject); @@ -652,8 +652,8 @@ NtDeleteKey(IN HANDLE KeyHandle) /* Dereference the object */ ObDereferenceObject(KeyObject); - //DPRINT("PointerCount %lu\n", ObGetObjectPointerCount((PVOID)KeyObject)); - //DPRINT("HandleCount %lu\n", ObGetObjectHandleCount((PVOID)KeyObject)); + DPRINT("PointerCount %lu\n", ObGetObjectPointerCount((PVOID)KeyObject)); + DPRINT("HandleCount %lu\n", ObGetObjectHandleCount((PVOID)KeyObject)); /* * Note: diff --git a/reactos/ntoskrnl/cm/registry.c b/reactos/ntoskrnl/cm/registry.c index b47b6b8f1bb..32dfd792ceb 100644 --- a/reactos/ntoskrnl/cm/registry.c +++ b/reactos/ntoskrnl/cm/registry.c @@ -22,9 +22,6 @@ #pragma alloc_text(INIT, CmInit2) #endif -#define ObGetObjectPointerCount(x) OBJECT_TO_OBJECT_HEADER(x)->PointerCount -#define ObGetObjectHandleCount(x) OBJECT_TO_OBJECT_HEADER(x)->HandleCount - /* GLOBALS ******************************************************************/ POBJECT_TYPE CmiKeyType = NULL;