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

Function Ext2FreePool

Ext4Fsd/debug.c:2643–2681  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2641}
2642
2643VOID
2644Ext2FreePool(
2645 IN PVOID P,
2646 IN ULONG Tag
2647)
2648{
2649 PUCHAR Buffer = (PUCHAR)P;
2650 PULONG Data;
2651 ULONG NumberOfBytes, i;
2652 KIRQL Irql;
2653
2654 Buffer -= 0x10;
2655 Data = (PULONG)(Buffer);
2656 NumberOfBytes = Data[0];
2657 if (Data[1] != NumberOfBytes + 0x20) {
2658 DbgBreak();
2659 return;
2660 }
2661 for (i=0x08; i < 0x10; i++) {
2662 if (Buffer[i] != 'S') {
2663 DbgBreak();
2664 }
2665 Buffer[i] = '-';
2666 }
2667 for (i=0; i < 0x10; i++) {
2668 if (Buffer[i + NumberOfBytes + 0x10] != 'E') {
2669 DbgBreak();
2670 return;
2671 }
2672 Buffer[i + NumberOfBytes + 0x10] = '-';
2673 }
2674
2675 KeAcquireSpinLock(&Ext2MemoryLock, &Irql);
2676 Ext2TotalMemorySize = Ext2TotalMemorySize - NumberOfBytes;
2677 Ext2TotalAllocates -= 1;
2678 KeReleaseSpinLock(&Ext2MemoryLock, Irql);
2679
2680 ExFreePoolWithTag(Buffer, Tag);
2681}
2682
2683#else // EXT2_DEBUG
2684

Callers 15

Ext2FillEntryFunction · 0.85
Ext2QueryDirectoryFunction · 0.85
DriverUnloadFunction · 0.85
DriverEntryFunction · 0.85
Ext2QueryExtentMappingsFunction · 0.85
Ext2GetRetrievalPointersFunction · 0.85
Ext2GetReparsePointFunction · 0.85
Ext2SetReparsePointFunction · 0.85
Ext2MountVolumeFunction · 0.85
Ext2VerifyVolumeFunction · 0.85
Ext2FreeCcbFunction · 0.85
Ext2BuildNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected