MCPcopy Create free account
hub / github.com/bobranten/Ext4Fsd / Ext2AllocatePool

Function Ext2AllocatePool

Ext4Fsd/debug.c:2615–2641  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2613ULONG Ext2TotalAllocates = 0;
2614
2615PVOID
2616Ext2AllocatePool(
2617 IN POOL_TYPE PoolType,
2618 IN SIZE_T NumberOfBytes,
2619 IN ULONG Tag
2620)
2621{
2622 PUCHAR Buffer = ExAllocatePoolWithTag(
2623 PoolType,
2624 0x20 + NumberOfBytes,
2625 Tag);
2626 if (Buffer) {
2627 KIRQL Irql = 0;
2628 PULONG Data = (PULONG)Buffer;
2629 Data[0] = (ULONG)NumberOfBytes;
2630 Data[1] = (ULONG)NumberOfBytes + 0x20;
2631 memset(Buffer + 0x08, 'S', 8);
2632 memset(Buffer + 0x10 + NumberOfBytes, 'E', 0x10);
2633 Buffer += 0x10;
2634 KeAcquireSpinLock(&Ext2MemoryLock, &Irql);
2635 Ext2TotalMemorySize = Ext2TotalMemorySize + NumberOfBytes;
2636 Ext2TotalAllocates += 1;
2637 KeReleaseSpinLock(&Ext2MemoryLock, Irql);
2638 }
2639
2640 return Buffer;
2641}
2642
2643VOID
2644Ext2FreePool(

Callers 15

Ext2FillEntryFunction · 0.85
Ext2QueryDirectoryFunction · 0.85
DriverEntryFunction · 0.85
Ext2QueryExtentMappingsFunction · 0.85
Ext2GetReparsePointFunction · 0.85
Ext2SetReparsePointFunction · 0.85
Ext2CheckDismountFunction · 0.85
Ext2BuildEntryFunction · 0.85
Ext2BuildNameFunction · 0.85
Ext2QueryVolumeParamsFunction · 0.85
Ext2FollowLinkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected