diff --git a/reactos/ntoskrnl/mm/ARM3/expool.c b/reactos/ntoskrnl/mm/ARM3/expool.c index 825dbddd763..b9e4c3a32ee 100644 --- a/reactos/ntoskrnl/mm/ARM3/expool.c +++ b/reactos/ntoskrnl/mm/ARM3/expool.c @@ -2046,10 +2046,25 @@ NTAPI ExAllocatePool(POOL_TYPE PoolType, SIZE_T NumberOfBytes) { - // - // Use a default tag of "None" - // - return ExAllocatePoolWithTag(PoolType, NumberOfBytes, TAG_NONE); + ULONG Tag = TAG_NONE; +#if 0 && DBG + PLDR_DATA_TABLE_ENTRY LdrEntry; + + /* Use the first four letters of the driver name, or "None" if unavailable */ + LdrEntry = KeGetCurrentIrql() <= APC_LEVEL + ? MiLookupDataTableEntry(_ReturnAddress()) + : NULL; + if (LdrEntry) + { + ULONG i; + Tag = 0; + for (i = 0; i < min(4, LdrEntry->BaseDllName.Length / sizeof(WCHAR)); i++) + Tag = Tag >> 8 | (LdrEntry->BaseDllName.Buffer[i] & 0xff) << 24; + for (; i < 4; i++) + Tag = Tag >> 8 | ' ' << 24; + } +#endif + return ExAllocatePoolWithTag(PoolType, NumberOfBytes, Tag); } /* @@ -2513,7 +2528,7 @@ ExAllocatePoolWithQuota(IN POOL_TYPE PoolType, // // Allocate the pool // - return ExAllocatePoolWithQuotaTag(PoolType, NumberOfBytes, 'enoN'); + return ExAllocatePoolWithQuotaTag(PoolType, NumberOfBytes, TAG_NONE); } /*