alloc_hugepages(2) System Calls Manual alloc_hugepages(2) alloc_hugepages, free_hugepages - void *syscall(SYS_alloc_hugepages, int key, void addr[.len], size_t len, int prot, int flag); int syscall(SYS_free_hugepages, void *addr); : glibc , syscall(2). The system calls alloc_hugepages() and free_hugepages() were introduced in Linux 2.5.36 and removed again in Linux 2.5.54. They existed only on i386 and ia64 (when built with CONFIG_HUGETLB_PAGE). In Linux 2.4.20, the syscall numbers exist, but the calls fail with the error ENOSYS. i386 (4 ) (2 4 ). , ia64 . . . key . . key -. addr free_hugepages() : alloc_hugepages(). (, , .) addr alloc_hugepages() -- , . . len . . prot . : PROT_READ, PROT_WRITE, PROT_EXEC. flag , key . , flag -- IPC_CREAT, , . , ENOENT, . On success, alloc_hugepages() returns the allocated virtual address, and free_hugepages() returns zero. On error, -1 is returned, and errno is set to indicate the error. ENOSYS . /proc/sys/vm/nr_hugepages hugetlb. . /proc/meminfo hugetlb : HugePages_Total, HugePages_Free, Hugepagesize. Linux on Intel processors. These system calls are gone; they existed only in Linux 2.5.36 through to Linux 2.5.54. Now the hugetlbfs filesystem can be used instead. Memory backed by huge pages (if the CPU supports them) is obtained by using mmap(2) to map files in this virtual filesystem. hugepages=. () Dmitry Bolkhovskikh Yuri Kozlov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () <>. Linux 6.9.1 2 2024 . alloc_hugepages(2)