Project

General

Profile

Feature #14705 ยป 0001-eval.c-ruby_setup-disable-THP-on-Linux.patch

normalperson (Eric Wong), 04/22/2018 10:21 PM

View differences:

eval.c
#include "mjit.h"
#include "probes.h"
#include "probes_helper.h"
#ifdef HAVE_SYS_PRCTL_H
#include <sys/prctl.h>
#endif
NORETURN(void rb_raise_jump(VALUE, VALUE));
......
return 0;
ruby_init_stack((void *)&state);
/*
* Disable THP early before mallocs happen because we want this to
* affect as many future pages as possible for CoW-friendliness
*/
#if defined(__linux__) && defined(PR_SET_THP_DISABLE)
prctl(PR_SET_THP_DISABLE, 1, 0, 0, 0);
#endif
Init_BareVM();
Init_heap();
Init_vm_objects();
-
    (1-1/1)