| 640 | flAllocationType |= MEM_GRAPHICS; |
| 641 | } |
| 642 | |
| 643 | return EraVirtualAlloc(nullptr, dwSize, flAllocationType, PAGE_READWRITE); |
| 644 | } |
| 645 | |
| 646 | void *ptr = _aligned_malloc(dwSize, 1ULL << max(4, attr.s.dwAlignment)); |
| 647 | |
| 648 | if (ptr) |
| 649 | memset(ptr, 0, dwSize); |
| 650 | |
| 651 | return ptr; |
| 652 | } |
| 653 | |
| 654 | EXTERN_C void __stdcall XMemFreeDefault(PVOID lpAddress, ULONGLONG dwAttributes) |
| 655 | { |
| 656 | auto attr = XALLOC_ATTRIBUTES { dwAttributes }; |
| 657 | |
| 658 | if (attr.s.dwMemoryType != XALLOC_MEMTYPE_HEAP) |
| 659 | { |
| 660 | EraVirtualFree(lpAddress, 0, MEM_RELEASE); |
| 661 | return; |
nothing calls this directly
no outgoing calls
no test coverage detected