diff options
author | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2014-10-01 07:02:39 +0000 |
---|---|---|
committer | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2014-10-01 07:02:39 +0000 |
commit | 0c1a4f40feeb76ff4e22f20e7c2d7afb65cc88fc (patch) | |
tree | 6ee0d39cfea871aefcdd458029b6b3ed34ed4469 /tests | |
parent | 947f043fa0a77a5430825859388b42a165e4ce20 (diff) |
tests: Fix allocator.cpp indentation
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1030 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'tests')
-rw-r--r-- | tests/allocator.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
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<void*>(align_to_page(reinterpret_cast<size_t>(result))); - } + return reinterpret_cast<void*>(align_to_page(reinterpret_cast<size_t>(result))); + } void* allocate(size_t size) { @@ -61,8 +61,8 @@ namespace void* rptr = static_cast<char*>(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 |