| Index: base/trace_event/heap_profiler_allocation_register_posix.cc
|
| diff --git a/base/trace_event/heap_profiler_allocation_register_posix.cc b/base/trace_event/heap_profiler_allocation_register_posix.cc
|
| index c38d7e69182b9a3d73537cc2d4ac148aca9972a1..8caec5e9e935db7f460f32b7d29a1d083d3b086f 100644
|
| --- a/base/trace_event/heap_profiler_allocation_register_posix.cc
|
| +++ b/base/trace_event/heap_profiler_allocation_register_posix.cc
|
| @@ -18,6 +18,7 @@
|
|
|
| namespace base {
|
| namespace trace_event {
|
| +namespace internal {
|
|
|
| namespace {
|
| size_t GetGuardSize() {
|
| @@ -25,8 +26,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.
|
| @@ -49,11 +49,11 @@ void* AllocationRegister::AllocateVirtualMemory(size_t size) {
|
| }
|
|
|
| // static
|
| -void AllocationRegister::FreeVirtualMemory(void* address,
|
| - size_t allocated_size) {
|
| +void FreeGuardedVirtualMemory(void* address, size_t allocated_size) {
|
| size_t size = bits::Align(allocated_size, GetPageSize()) + GetGuardSize();
|
| munmap(address, size);
|
| }
|
|
|
| +} // namespace internal
|
| } // namespace trace_event
|
| } // namespace base
|
|
|