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

Function set_jemalloc_bg_thread

src/zmalloc.cpp:511–516  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

509}
510
511void set_jemalloc_bg_thread(int enable) {
512 /* let jemalloc do purging asynchronously, required when there's no traffic
513 * after flushdb */
514 char val = !!enable;
515 mallctl("background_thread", NULL, 0, &val, 1);
516}
517
518int jemalloc_purge() {
519 /* return all unused (reserved) pages to the OS */

Callers 2

InitServerLastFunction · 0.85
updateJemallocBgThreadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected