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

Side by Side Diff: third_party/tcmalloc/chromium/src/debugallocation.cc

Issue 55333002: Make possible to check memory allocations inside chromium (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make possible to check memory allocations inside chromium Created 7 years, 1 month 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
OLDNEW
1 // Copyright (c) 2000, Google Inc. 1 // Copyright (c) 2000, 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 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after
1423 1423
1424 #ifdef HAVE_STRUCT_MALLINFO 1424 #ifdef HAVE_STRUCT_MALLINFO
1425 extern "C" PERFTOOLS_DLL_DECL struct mallinfo tc_mallinfo(void) __THROW { 1425 extern "C" PERFTOOLS_DLL_DECL struct mallinfo tc_mallinfo(void) __THROW {
1426 return BASE_MALLINFO(); 1426 return BASE_MALLINFO();
1427 } 1427 }
1428 #endif 1428 #endif
1429 1429
1430 extern "C" PERFTOOLS_DLL_DECL size_t tc_malloc_size(void* ptr) __THROW { 1430 extern "C" PERFTOOLS_DLL_DECL size_t tc_malloc_size(void* ptr) __THROW {
1431 return MallocExtension::instance()->GetAllocatedSize(ptr); 1431 return MallocExtension::instance()->GetAllocatedSize(ptr);
1432 } 1432 }
1433
1434 namespace base {
willchan no longer on Chromium 2013/11/02 21:11:44 Sorry, this is not acceptable. You can't define a
1435
1436 void* UncheckedMalloc(size_t size) {
1437 void* result = do_malloc(size);
1438 MallocHook::InvokeNewHook(result, size);
1439 return result;
1440 }
1441
1442 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698