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

Side by Side Diff: base/process/memory_mac.mm

Issue 1543293004: Switch to standard integer types in base/process/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ssize_t Created 4 years, 12 months 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
« no previous file with comments | « base/process/memory_linux.cc ('k') | base/process/memory_stubs.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/process/memory.h" 5 #include "base/process/memory.h"
6 6
7 #include <CoreFoundation/CoreFoundation.h> 7 #include <CoreFoundation/CoreFoundation.h>
8 #include <errno.h> 8 #include <errno.h>
9 #include <mach/mach.h> 9 #include <mach/mach.h>
10 #include <mach/mach_vm.h> 10 #include <mach/mach_vm.h>
11 #include <malloc/malloc.h> 11 #include <malloc/malloc.h>
12 #import <objc/runtime.h> 12 #import <objc/runtime.h>
13 #include <stddef.h>
13 14
14 #include <new> 15 #include <new>
15 16
16 #include "base/lazy_instance.h" 17 #include "base/lazy_instance.h"
17 #include "base/logging.h" 18 #include "base/logging.h"
18 #include "base/mac/mac_util.h" 19 #include "base/mac/mac_util.h"
19 #include "base/mac/mach_logging.h" 20 #include "base/mac/mach_logging.h"
20 #include "base/scoped_clear_errno.h" 21 #include "base/scoped_clear_errno.h"
22 #include "build/build_config.h"
21 #include "third_party/apple_apsl/CFBase.h" 23 #include "third_party/apple_apsl/CFBase.h"
22 #include "third_party/apple_apsl/malloc.h" 24 #include "third_party/apple_apsl/malloc.h"
23 25
24 namespace base { 26 namespace base {
25 27
26 void EnableTerminationOnHeapCorruption() { 28 void EnableTerminationOnHeapCorruption() {
27 #if !ARCH_CPU_64_BITS 29 #if !ARCH_CPU_64_BITS
28 DLOG(WARNING) << "EnableTerminationOnHeapCorruption only works on 64-bit"; 30 DLOG(WARNING) << "EnableTerminationOnHeapCorruption only works on 64-bit";
29 #endif 31 #endif
30 } 32 }
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 @selector(allocWithZone:)); 555 @selector(allocWithZone:));
554 g_old_allocWithZone = reinterpret_cast<allocWithZone_t>( 556 g_old_allocWithZone = reinterpret_cast<allocWithZone_t>(
555 method_getImplementation(orig_method)); 557 method_getImplementation(orig_method));
556 CHECK(g_old_allocWithZone) 558 CHECK(g_old_allocWithZone)
557 << "Failed to get allocWithZone allocation function."; 559 << "Failed to get allocWithZone allocation function.";
558 method_setImplementation(orig_method, 560 method_setImplementation(orig_method,
559 reinterpret_cast<IMP>(oom_killer_allocWithZone)); 561 reinterpret_cast<IMP>(oom_killer_allocWithZone));
560 } 562 }
561 563
562 } // namespace base 564 } // namespace base
OLDNEW
« no previous file with comments | « base/process/memory_linux.cc ('k') | base/process/memory_stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698