OLD | NEW |
---|---|
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 Loading... | |
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 } | |
OLD | NEW |