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

Function MallocHook_SetMmapReplacement

BeefRT/gperftools/src/malloc_hook.cc:363–369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

361
362extern "C"
363int MallocHook_SetMmapReplacement(MallocHook_MmapReplacement hook) {
364 RAW_VLOG(10, "SetMmapReplacement(%p)", hook);
365 // NOTE this is a best effort CHECK. Concurrent sets could succeed since
366 // this test is outside of the Add spin lock.
367 RAW_CHECK(mmap_replacement_.empty(), "Only one MMapReplacement is allowed.");
368 return mmap_replacement_.Add(hook);
369}
370
371extern "C"
372int MallocHook_RemoveMmapReplacement(MallocHook_MmapReplacement hook) {

Callers 1

SetMmapReplacementFunction · 0.50

Calls 3

RAW_VLOGFunction · 0.50
emptyMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected