diff options
author | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-08-30 18:30:39 +0000 |
---|---|---|
committer | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-08-30 18:30:39 +0000 |
commit | cec7bfb54dbc624f781f0fbefec59f3c9ce666b1 (patch) | |
tree | c721b6adf9ea6ce0baab64fe3e47fec6a7aa8bd7 /tests | |
parent | bfbf61ba938554f9265cccee01f9f6b62ea6d534 (diff) |
tests: Custom allocations now use memory from Win32 heap instead of CRT heap
git-svn-id: http://pugixml.googlecode.com/svn/trunk@711 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'tests')
-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); } |