diff options
| -rw-r--r-- | tests/allocator.cpp | 5 | 
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/allocator.cpp b/tests/allocator.cpp index a1a0351..b90820e 100644 --- a/tests/allocator.cpp +++ b/tests/allocator.cpp @@ -28,7 +28,10 @@ namespace  	void* allocate_page_aligned(size_t size)      {          // We can't use VirtualAlloc because it has 64Kb granularity so we run out of address space quickly -        void* result = malloc(size + PAGE_SIZE); +		// We can't use malloc because of occasional problems with CW on CRT termination +		static HANDLE heap = HeapCreate(0, 0, 0); + +        void* result = HeapAlloc(heap, 0, size + PAGE_SIZE);          return (void*)align_to_page((size_t)result);      }  | 
