MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / pages_purge_forced

Function pages_purge_forced

deps/jemalloc/src/pages.c:326–344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324}
325
326bool
327pages_purge_forced(void *addr, size_t size) {
328 assert(PAGE_ADDR2BASE(addr) == addr);
329 assert(PAGE_CEILING(size) == size);
330
331 if (!pages_can_purge_forced) {
332 return true;
333 }
334
335#if defined(JEMALLOC_PURGE_MADVISE_DONTNEED) && \
336 defined(JEMALLOC_PURGE_MADVISE_DONTNEED_ZEROS)
337 return (madvise(addr, size, MADV_DONTNEED) != 0);
338#elif defined(JEMALLOC_MAPS_COALESCE)
339 /* Try to overlay a new demand-zeroed mapping. */
340 return pages_commit(addr, size);
341#else
342 not_reached();
343#endif
344}
345
346static bool
347pages_huge_impl(void *addr, size_t size, bool aligned) {

Callers 4

extent_recycleFunction · 0.70
extent_grow_retainedFunction · 0.70
base_unmapFunction · 0.70

Calls 1

pages_commitFunction · 0.70

Tested by

no test coverage detected