Index: base/trace_event/heap_profiler_allocation_register_win.cc |
diff --git a/base/trace_event/heap_profiler_allocation_register_win.cc b/base/trace_event/heap_profiler_allocation_register_win.cc |
index bc0afbf340199ca61bfff6fd043ab05353e2bac0..39cbb1807286de16a57d4d731906c21509b724c5 100644 |
--- a/base/trace_event/heap_profiler_allocation_register_win.cc |
+++ b/base/trace_event/heap_profiler_allocation_register_win.cc |
@@ -13,6 +13,7 @@ |
namespace base { |
namespace trace_event { |
+namespace internal { |
namespace { |
size_t GetGuardSize() { |
@@ -20,8 +21,7 @@ size_t GetGuardSize() { |
} |
} |
-// static |
-void* AllocationRegister::AllocateVirtualMemory(size_t size) { |
+void* AllocateGuardedVirtualMemory(size_t size) { |
size = bits::Align(size, GetPageSize()); |
// Add space for a guard page at the end. |
@@ -50,14 +50,13 @@ void* AllocationRegister::AllocateVirtualMemory(size_t size) { |
return addr; |
} |
-// static |
-void AllocationRegister::FreeVirtualMemory(void* address, |
- size_t allocated_size) { |
+void FreeGuardedVirtualMemory(void* address, size_t allocated_size) { |
// For |VirtualFree|, the size passed with |MEM_RELEASE| mut be 0. Windows |
// automatically frees the entire region that was reserved by the |
// |VirtualAlloc| with flag |MEM_RESERVE|. |
VirtualFree(address, 0, MEM_RELEASE); |
} |
+} // namespace internal |
} // namespace trace_event |
} // namespace base |