alloc_hugepages(2) System Calls Manual alloc_hugepages(2) alloc_hugepages, free_hugepages - void *syscall(size_t size; SYS_alloc_hugepages, int key, void addr[size], size_t size, 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() -- , . . The size argument is the size of the required segment. It must be a multiple of the huge page size. 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 Intel. ; Linux 2.5.36 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.17 8 2026 . alloc_hugepages(2)