… | |
… | |
1776 | |
1776 | |
1777 | int mlockall (int flags = MCL_CURRENT | MCL_FUTURE) |
1777 | int mlockall (int flags = MCL_CURRENT | MCL_FUTURE) |
1778 | INIT: |
1778 | INIT: |
1779 | #if __GLIBC__ |
1779 | #if __GLIBC__ |
1780 | mallopt (M_TOP_PAD, 1024 * 1024); |
1780 | mallopt (M_TOP_PAD, 1024 * 1024); |
1781 | mallopt (M_MMAP_THRESHOLD, 1024 * 1024 * 128); |
1781 | mallopt (M_MMAP_THRESHOLD, 1024 * 1024); |
1782 | 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_MAJOR < 2 || (__GLIBC_MAJOR == 2 && __GLIBC_MINOR < 10)) |
1783 | mallopt (M_PERTURB, 0xee); // bug-workaround for linux glibc+mlockall+calloc |
1784 | mallopt (M_PERTURB, 0xee); // bug-workaround for linux glibc+mlockall+calloc |
1784 | #endif |
1785 | #endif |
1785 | |
1786 | |
1786 | int munlockall () |
1787 | int munlockall () |
1787 | |
1788 | |
1788 | #endif |
1789 | #endif |