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

Function MallocHook_SetMunmapReplacement

BeefRT/gperftools/src/malloc_hook.cc:402–409  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

400
401extern "C"
402int MallocHook_SetMunmapReplacement(MallocHook_MunmapReplacement hook) {
403 RAW_VLOG(10, "SetMunmapReplacement(%p)", hook);
404 // NOTE this is a best effort CHECK. Concurrent sets could succeed since
405 // this test is outside of the Add spin lock.
406 RAW_CHECK(munmap_replacement_.empty(),
407 "Only one MunmapReplacement is allowed.");
408 return munmap_replacement_.Add(hook);
409}
410
411extern "C"
412int MallocHook_RemoveMunmapReplacement(MallocHook_MunmapReplacement hook) {

Callers 1

SetMunmapReplacementFunction · 0.50

Calls 3

RAW_VLOGFunction · 0.50
emptyMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected