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

Side by Side Diff: base/allocator/allocator_shim_win.cc

Issue 1538743002: Switch to standard integer types in base/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DEPS roll too Created 4 years, 11 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 | « DEPS ('k') | base/allocator/unittest_utils.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <limits.h>
5 #include <malloc.h> 6 #include <malloc.h>
6 #include <new.h> 7 #include <new.h>
7 #include <windows.h> 8 #include <windows.h>
8 9 #include <stddef.h>
9 #include "base/basictypes.h"
10 10
11 // This shim make it possible to perform additional checks on allocations 11 // This shim make it possible to perform additional checks on allocations
12 // before passing them to the Heap functions. 12 // before passing them to the Heap functions.
13 13
14 // Heap functions are stripped from libcmt.lib using the prep_libc.py 14 // Heap functions are stripped from libcmt.lib using the prep_libc.py
15 // for each object file stripped, we re-implement them here to allow us to 15 // for each object file stripped, we re-implement them here to allow us to
16 // perform additional checks: 16 // perform additional checks:
17 // 1. Enforcing the maximum size that can be allocated to 2Gb. 17 // 1. Enforcing the maximum size that can be allocated to 2Gb.
18 // 2. Calling new_handler if malloc fails. 18 // 2. Calling new_handler if malloc fails.
19 19
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 void _free_dbg(void* ptr, int) { 313 void _free_dbg(void* ptr, int) {
314 free(ptr); 314 free(ptr);
315 } 315 }
316 316
317 void* _calloc_dbg(size_t n, size_t size, int, const char*, int) { 317 void* _calloc_dbg(size_t n, size_t size, int, const char*, int) {
318 return calloc(n, size); 318 return calloc(n, size);
319 } 319 }
320 #endif // NDEBUG 320 #endif // NDEBUG
321 321
322 } // extern C 322 } // extern C
OLDNEW
« no previous file with comments | « DEPS ('k') | base/allocator/unittest_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698