MCPcopy Create free account
hub / github.com/F-Stack/f-stack / pages_set_thp_state

Function pages_set_thp_state

app/redis-6.2.6/deps/jemalloc/src/pages.c:496–513  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

494#endif
495
496void
497pages_set_thp_state (void *ptr, size_t size) {
498 if (opt_thp == thp_mode_default || opt_thp == init_system_thp_mode) {
499 return;
500 }
501 assert(opt_thp != thp_mode_not_supported &&
502 init_system_thp_mode != thp_mode_not_supported);
503
504 if (opt_thp == thp_mode_always
505 && init_system_thp_mode != thp_mode_never) {
506 assert(init_system_thp_mode == thp_mode_default);
507 pages_huge_unaligned(ptr, size);
508 } else if (opt_thp == thp_mode_never) {
509 assert(init_system_thp_mode == thp_mode_default ||
510 init_system_thp_mode == thp_mode_always);
511 pages_nohuge_unaligned(ptr, size);
512 }
513}
514
515static void
516init_thp_state(void) {

Callers 1

Calls 2

pages_huge_unalignedFunction · 0.85
pages_nohuge_unalignedFunction · 0.85

Tested by

no test coverage detected