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

Side by Side Diff: third_party/tcmalloc/chromium/src/malloc_hook-inl.h

Issue 9323026: [NOT TO COMMIT!] r109: Diff of the current tcmalloc from the original google-perftools r109. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 8 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2005, Google Inc. 1 // Copyright (c) 2005, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 old_addr, old_size, 286 old_addr, old_size,
287 new_size, flags, new_addr); 287 new_size, flags, new_addr);
288 // End DEPRECATED code. 288 // End DEPRECATED code.
289 } 289 }
290 290
291 // The following method is DEPRECATED 291 // The following method is DEPRECATED
292 inline MallocHook::PreSbrkHook MallocHook::GetPreSbrkHook() { 292 inline MallocHook::PreSbrkHook MallocHook::GetPreSbrkHook() {
293 return base::internal::presbrk_hook_.Get(); 293 return base::internal::presbrk_hook_.Get();
294 } 294 }
295 295
296 inline void MallocHook::InvokePreSbrkHook(ptrdiff_t increment) { 296 inline void MallocHook::InvokePreSbrkHook(std::ptrdiff_t increment) {
297 if (!base::internal::presbrk_hooks_.empty() && increment != 0) { 297 if (!base::internal::presbrk_hooks_.empty() && increment != 0) {
298 InvokePreSbrkHookSlow(increment); 298 InvokePreSbrkHookSlow(increment);
299 } 299 }
300 // The following code is DEPRECATED. 300 // The following code is DEPRECATED.
301 MallocHook::PreSbrkHook hook = MallocHook::GetPreSbrkHook(); 301 MallocHook::PreSbrkHook hook = MallocHook::GetPreSbrkHook();
302 if (hook != NULL && increment != 0) (*hook)(increment); 302 if (hook != NULL && increment != 0) (*hook)(increment);
303 // End DEPRECATED code. 303 // End DEPRECATED code.
304 } 304 }
305 305
306 // The following method is DEPRECATED 306 // The following method is DEPRECATED
307 inline MallocHook::SbrkHook MallocHook::GetSbrkHook() { 307 inline MallocHook::SbrkHook MallocHook::GetSbrkHook() {
308 return base::internal::sbrk_hook_.Get(); 308 return base::internal::sbrk_hook_.Get();
309 } 309 }
310 310
311 inline void MallocHook::InvokeSbrkHook(const void* result, 311 inline void MallocHook::InvokeSbrkHook(const void* result,
312 ptrdiff_t increment) { 312 std::ptrdiff_t increment) {
313 if (!base::internal::sbrk_hooks_.empty() && increment != 0) { 313 if (!base::internal::sbrk_hooks_.empty() && increment != 0) {
314 InvokeSbrkHookSlow(result, increment); 314 InvokeSbrkHookSlow(result, increment);
315 } 315 }
316 // The following code is DEPRECATED. 316 // The following code is DEPRECATED.
317 MallocHook::SbrkHook hook = MallocHook::GetSbrkHook(); 317 MallocHook::SbrkHook hook = MallocHook::GetSbrkHook();
318 if (hook != NULL && increment != 0) (*hook)(result, increment); 318 if (hook != NULL && increment != 0) (*hook)(result, increment);
319 // End DEPRECATED code. 319 // End DEPRECATED code.
320 } 320 }
321 321
322 #endif /* _MALLOC_HOOK_INL_H_ */ 322 #endif /* _MALLOC_HOOK_INL_H_ */
OLDNEW
« no previous file with comments | « third_party/tcmalloc/chromium/src/malloc_hook.cc ('k') | third_party/tcmalloc/chromium/src/memory_region_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698