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

Side by Side Diff: base/process/memory_linux.cc

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 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
« no previous file with comments | « base/process/memory.cc ('k') | base/process/memory_mac.mm » ('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 <stddef.h>
8
7 #include <new> 9 #include <new>
8 10
9 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 12 #include "base/files/file_util.h"
11 #include "base/logging.h" 13 #include "base/logging.h"
12 #include "base/process/internal_linux.h" 14 #include "base/process/internal_linux.h"
13 #include "base/strings/string_number_conversions.h" 15 #include "base/strings/string_number_conversions.h"
16 #include "build/build_config.h"
14 17
15 #if defined(USE_TCMALLOC) 18 #if defined(USE_TCMALLOC)
16 // Used by UncheckedMalloc. If tcmalloc is linked to the executable 19 // Used by UncheckedMalloc. If tcmalloc is linked to the executable
17 // this will be replaced by a strong symbol that actually implement 20 // this will be replaced by a strong symbol that actually implement
18 // the semantics and don't call new handler in case the allocation fails. 21 // the semantics and don't call new handler in case the allocation fails.
19 extern "C" { 22 extern "C" {
20 23
21 __attribute__((weak, visibility("default"))) 24 __attribute__((weak, visibility("default")))
22 void* tc_malloc_skip_new_handler_weak(size_t size); 25 void* tc_malloc_skip_new_handler_weak(size_t size);
23 26
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 *result = malloc(size); 207 *result = malloc(size);
205 #elif defined(LIBC_GLIBC) && !defined(USE_TCMALLOC) 208 #elif defined(LIBC_GLIBC) && !defined(USE_TCMALLOC)
206 *result = __libc_malloc(size); 209 *result = __libc_malloc(size);
207 #elif defined(USE_TCMALLOC) 210 #elif defined(USE_TCMALLOC)
208 *result = tc_malloc_skip_new_handler_weak(size); 211 *result = tc_malloc_skip_new_handler_weak(size);
209 #endif 212 #endif
210 return *result != NULL; 213 return *result != NULL;
211 } 214 }
212 215
213 } // namespace base 216 } // namespace base
OLDNEW
« no previous file with comments | « base/process/memory.cc ('k') | base/process/memory_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698