MCPcopy Create free account
hub / github.com/beefytech/Beef / tc_new

Function tc_new

BeefRT/gperftools/src/debugallocation.cc:1216–1223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1214}
1215
1216extern "C" PERFTOOLS_DLL_DECL void* tc_new(size_t size) {
1217 void* ptr = debug_cpp_alloc(size, MallocBlock::kNewType, false);
1218 MallocHook::InvokeNewHook(ptr, size);
1219 if (ptr == NULL) {
1220 RAW_LOG(FATAL, "Unable to allocate %" PRIuS " bytes: new failed.", size);
1221 }
1222 return ptr;
1223}
1224
1225extern "C" PERFTOOLS_DLL_DECL void* tc_new_nothrow(size_t size, const std::nothrow_t&) __THROW {
1226 void* ptr = debug_cpp_alloc(size, MallocBlock::kNewType, true);

Callers

nothing calls this directly

Calls 2

debug_cpp_allocFunction · 0.70
RAW_LOGFunction · 0.50

Tested by

no test coverage detected