| 2613 | ULONG Ext2TotalAllocates = 0; |
| 2614 | |
| 2615 | PVOID |
| 2616 | Ext2AllocatePool( |
| 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 | |
| 2643 | VOID |
| 2644 | Ext2FreePool( |
no outgoing calls
no test coverage detected