Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Side by Side Diff: base/trace_event/heap_profiler_allocation_register_posix.cc

Issue 1546033002: Switch to standard integer types in base/trace_event/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/trace_event/heap_profiler_allocation_register.h" 5 #include "base/trace_event/heap_profiler_allocation_register.h"
6 6
7 #include <stddef.h>
7 #include <sys/mman.h> 8 #include <sys/mman.h>
8 #include <unistd.h> 9 #include <unistd.h>
9 10
10 #include "base/basictypes.h"
11 #include "base/bits.h" 11 #include "base/bits.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/process/process_metrics.h" 13 #include "base/process/process_metrics.h"
14 14
15 #ifndef MAP_ANONYMOUS 15 #ifndef MAP_ANONYMOUS
16 #define MAP_ANONYMOUS MAP_ANON 16 #define MAP_ANONYMOUS MAP_ANON
17 #endif 17 #endif
18 18
19 namespace base { 19 namespace base {
20 namespace trace_event { 20 namespace trace_event {
(...skipping 29 matching lines...) Expand all
50 50
51 // static 51 // static
52 void AllocationRegister::FreeVirtualMemory(void* address, 52 void AllocationRegister::FreeVirtualMemory(void* address,
53 size_t allocated_size) { 53 size_t allocated_size) {
54 size_t size = bits::Align(allocated_size, GetPageSize()) + GetGuardSize(); 54 size_t size = bits::Align(allocated_size, GetPageSize()) + GetGuardSize();
55 munmap(address, size); 55 munmap(address, size);
56 } 56 }
57 57
58 } // namespace trace_event 58 } // namespace trace_event
59 } // namespace base 59 } // namespace base
OLDNEW
« no previous file with comments | « base/trace_event/heap_profiler_allocation_register.h ('k') | base/trace_event/heap_profiler_allocation_register_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698