From 0c1a4f40feeb76ff4e22f20e7c2d7afb65cc88fc Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Wed, 1 Oct 2014 07:02:39 +0000 Subject: tests: Fix allocator.cpp indentation git-svn-id: https://pugixml.googlecode.com/svn/trunk@1030 99668b35-9821-0410-8761-19e4c4f06640 --- tests/allocator.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'tests/allocator.cpp') diff --git a/tests/allocator.cpp b/tests/allocator.cpp index 6b0dd64..3641585 100644 --- a/tests/allocator.cpp +++ b/tests/allocator.cpp @@ -24,21 +24,21 @@ namespace { const size_t PAGE_SIZE = 4096; - size_t align_to_page(size_t value) - { - return (value + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1); - } + size_t align_to_page(size_t value) + { + return (value + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1); + } 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 + { + // We can't use VirtualAlloc because it has 64Kb granularity so we run out of address space quickly // 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); + void* result = HeapAlloc(heap, 0, size + PAGE_SIZE); - return reinterpret_cast(align_to_page(reinterpret_cast(result))); - } + return reinterpret_cast(align_to_page(reinterpret_cast(result))); + } void* allocate(size_t size) { @@ -61,8 +61,8 @@ namespace void* rptr = static_cast(ptr) + size - aligned_size; - DWORD old_flags; - VirtualProtect(rptr, aligned_size + PAGE_SIZE, PAGE_NOACCESS, &old_flags); + DWORD old_flags; + VirtualProtect(rptr, aligned_size + PAGE_SIZE, PAGE_NOACCESS, &old_flags); } } #else -- cgit v1.2.3