| 400 | |
| 401 | extern "C" |
| 402 | int 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 | |
| 411 | extern "C" |
| 412 | int MallocHook_RemoveMunmapReplacement(MallocHook_MunmapReplacement hook) { |
no test coverage detected