… | |
… | |
1463 | # undef def |
1463 | # undef def |
1464 | # define def(name, use, nonuse) const_iv (body_ ## name) |
1464 | # define def(name, use, nonuse) const_iv (body_ ## name) |
1465 | # include "slotinc.h" |
1465 | # include "slotinc.h" |
1466 | # undef def |
1466 | # undef def |
1467 | |
1467 | |
1468 | const_iv (Map0Cmd) const_iv (Map1Cmd) const_iv (Map1aCmd) |
|
|
1469 | |
|
|
1470 | const_iv (MAP_CLIENT_X) const_iv (MAP_CLIENT_Y) |
1468 | const_iv (MAP_CLIENT_X) const_iv (MAP_CLIENT_Y) |
1471 | |
1469 | |
1472 | const_iv (MAX_TIME) |
1470 | const_iv (MAX_TIME) |
1473 | const_iv (MAXSOCKBUF) |
1471 | const_iv (MAXSOCKBUF) |
1474 | |
1472 | |
… | |
… | |
1778 | |
1776 | |
1779 | int mlockall (int flags = MCL_CURRENT | MCL_FUTURE) |
1777 | int mlockall (int flags = MCL_CURRENT | MCL_FUTURE) |
1780 | INIT: |
1778 | INIT: |
1781 | #if __GLIBC__ |
1779 | #if __GLIBC__ |
1782 | mallopt (M_TOP_PAD, 1024 * 1024); |
1780 | mallopt (M_TOP_PAD, 1024 * 1024); |
1783 | mallopt (M_MMAP_THRESHOLD, 1024 * 1024 * 128); |
1781 | mallopt (M_MMAP_THRESHOLD, 1024 * 1024); |
1784 | mallopt (M_MMAP_MAX, 0); // likely bug-workaround, also frees memory |
1782 | mallopt (M_MMAP_MAX, 0); // likely bug-workaround, also frees memory |
|
|
1783 | if (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 10)) |
1785 | mallopt (M_PERTURB, 0xee); // bug-workaround for linux glibc+mlockall+calloc |
1784 | mallopt (M_PERTURB, 0xee); // bug-workaround for linux glibc+mlockall+calloc |
1786 | #endif |
1785 | #endif |
1787 | |
1786 | |
1788 | int munlockall () |
1787 | int munlockall () |
1789 | |
1788 | |
1790 | #endif |
1789 | #endif |