… | |
… | |
1725 | #if _POSIX_MEMLOCK |
1725 | #if _POSIX_MEMLOCK |
1726 | |
1726 | |
1727 | int mlockall (int flags = MCL_CURRENT | MCL_FUTURE) |
1727 | int mlockall (int flags = MCL_CURRENT | MCL_FUTURE) |
1728 | INIT: |
1728 | INIT: |
1729 | #if __GLIBC__ |
1729 | #if __GLIBC__ |
|
|
1730 | mallopt (M_TOP_PAD, 1024 * 1024); |
|
|
1731 | mallopt (M_MMAP_THRESHOLD, 1024 * 1024 * 128); |
|
|
1732 | mallopt (M_MMAP_MAX, 0); // likely bug-workaround, also frees memory |
1730 | mallopt (M_PERTURB, 0xee); // bug-workaround for linux glibc+mlockall+calloc |
1733 | mallopt (M_PERTURB, 0xee); // bug-workaround for linux glibc+mlockall+calloc |
1731 | #endif |
1734 | #endif |
1732 | |
1735 | |
1733 | int munlockall () |
1736 | int munlockall () |
1734 | |
1737 | |