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

Side by Side Diff: base/process/memory_win.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_unittest_mac.mm ('k') | base/process/process.h » ('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 <new.h> 7 #include <new.h>
8 #include <psapi.h> 8 #include <psapi.h>
9 #include <stddef.h>
9 10
10 #include "base/logging.h" 11 #include "base/logging.h"
11 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
12 13
13 // malloc_unchecked is required to implement UncheckedMalloc properly. 14 // malloc_unchecked is required to implement UncheckedMalloc properly.
14 // It's provided by allocator_shim_win.cc but since that's not always present, 15 // It's provided by allocator_shim_win.cc but since that's not always present,
15 // we provide a default that falls back to regular malloc. 16 // we provide a default that falls back to regular malloc.
16 typedef void* (*MallocFn)(size_t); 17 typedef void* (*MallocFn)(size_t);
17 extern "C" void* (*const malloc_unchecked)(size_t); 18 extern "C" void* (*const malloc_unchecked)(size_t);
18 extern "C" void* (*const malloc_default)(size_t) = &malloc; 19 extern "C" void* (*const malloc_default)(size_t) = &malloc;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 return instance; 106 return instance;
106 } 107 }
107 108
108 // Implemented using a weak symbol. 109 // Implemented using a weak symbol.
109 bool UncheckedMalloc(size_t size, void** result) { 110 bool UncheckedMalloc(size_t size, void** result) {
110 *result = malloc_unchecked(size); 111 *result = malloc_unchecked(size);
111 return *result != NULL; 112 return *result != NULL;
112 } 113 }
113 114
114 } // namespace base 115 } // namespace base
OLDNEW
« no previous file with comments | « base/process/memory_unittest_mac.mm ('k') | base/process/process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698