IceWalkers.com - Linux Software downloads and news
Name : Password :
Linux SoftwareLinux RPMLinux HowtosLink UsAboutAdvertise

alloc_hugepages (2)

ALLOC_HUGEPAGES(2)         Linux Programmer's Manual        ALLOC_HUGEPAGES(2)



NAME
       alloc_hugepages, free_hugepages - allocate or free huge pages

SYNOPSIS
       void*alloc_hugepages(int  key,void*addr,size_t len,int prot,int
       flag);

       intfree_hugepages(void*addr);

DESCRIPTION
       The system calls alloc_hugepages and free_hugepages were introduced  in
       Linux  2.5.36  and  removed again in 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 return ENOSYS.

       On  i386  the  memory management hardware knows about ordinary pages (4
       KiB) and huge pages (2 or 4 MiB). Similarly ia64 knows about huge pages
       of  several  sizes. These system calls serve to map huge pages into the
       process' memory or to free them again.  Huge pages are locked into mem-
       ory, and are not swapped.

       The  key  parameter  is an identifier. When zero the pages are private,
       and not inherited by children.  When positive the pages are shared with
       other  applications  using  the  same  key, and inherited by child pro-
       cesses.

       The addr parameter of free_hugepages() tells which page is being  freed
       -  it was the return value of a call to alloc_hugepages().  (The memory
       is first actually freed when all users have  released  it.)   The  addr
       parameter  of  alloc_hugepages()  is a hint, that the kernel may or may
       not follow.  Addresses must be properly aligned.

       The len parameter is the length of the required segment. It must  be  a
       multiple of the huge page size.

       The  prot parameter specifies the memory protection of the segment.  It
       is one of PROT_READ, PROT_WRITE, PROT_EXEC.

       The flag parameter is ignored, unless key is positive. In that case, if
       flag  is  IPC_CREAT,  then a new huge page segment is created when none
       with the given key existed. If this flag is not  set,  then  ENOENT  is
       returned when no segment with the given key exists.

RETURNVALUE
       On  success, alloc_hugepages returns the allocated virtual address, and
       free_hugepages returns zero. On error, -1 is returned, and errno is set
       appropriately.

ERRORS
       ENOSYS The system call is not supported on this kernel.

CONFORMINGTO
       These  calls  existed  only  in Linux 2.5.36 - 2.5.54.  These calls are
       specific to Linux on Intel processors, and should not be used  in  pro-
       grams  intended  to  be  portable.  Indeed, the system call numbers are
       marked for reuse, so programs using these may do something random on  a
       future kernel.

FILES
       /proc/sys/vm/nr_hugepages Number of configured hugetlb pages.  This can
       be read and written.

       /proc/meminfo Gives info on the number of configured hugetlb pages  and
       on  their  size in the three variables HugePages_Total, HugePages_Free,
       Hugepagesize.

NOTES
       The system calls are gone. Now the hugetlbfs  filesystem  can  be  used
       instead.   Memory  backed  by  huge pages (if the CPU supports them) is
       obtained by mmap'ing files in this virtual filesystem.

       The maximal number of huge pages can be specified using the  hugepages=
       boot parameter.





Linux 2.5.36                      2003-02-02                ALLOC_HUGEPAGES(2)

_Exitgetsockoptoutwshmat
_exitgettidoutw_pshmctl
_llseekgettimeofdaypauseshmdt
_newselectgetuidpersonalityshmget
_sysctlgttypipeshmop
acceptidlepivot_rootshutdown
accessinbpollsigaction
acctinb_pprctlsigaltstack
adjtimexinlpreadsigblock
afs_syscallinl_pprofsiggetmask
alarminsbpselectsigmask
alloc_hugepagesinslptracesignal
arch_prctlinswpwritesigpause
bdflushintroquotactlsigpending
bindinwreadsigprocmask
breakinw_preaddirsigqueue
brkioctlreadlinksigreturn
cacheflushioctl_listreadvsigsetmask
capgetiopermrebootsigsuspend
capsetioplrecvsigtimedwait
chdiripcrecvfromsigvec
chmodkillrecvmsgsigwaitinfo
chownkillpgrenamesocket
chrootlchownrmdirsocketcall
clonelinksbrksocketpair
closelistensched_get_priority_maxssetmask
connectllseeksched_get_priority_minstat
creatlocksched_getaffinitystatfs
duplseeksched_getparamstime
dup2lstatsched_getschedulerstty
execvemadvisesched_rr_get_intervalswapoff
exitmincoresched_setaffinityswapon
fchdirmkdirsched_setparamsymlink
fchmodmknodsched_setschedulersync
fchownmlocksched_yieldsyscall
fcntlmlockallselectsyscalls
fdatasyncmmapselect_tutsysctl
flockmmap2semctlsysfs
forkmodify_ldtsemgetsysinfo
free_hugepagesmountsemopsyslog
fstatmprotectsendtime
fstatfsmpxsendfiletimes
fsyncmremapsendmsgtkill
ftruncatemsgctlsendtotruncate
futexmsggetsetcontextumask
getcontextmsgopsetdomainnameumount
getdentsmsgrcvsetegidumount2
getdomainnamemsgsndseteuiduname
getdtablesizemsyncsetfsgidundocumented
getegidmunlocksetfsuidunimplemented
geteuidmunlockallsetgidunlink
getgidmunmapsetgroupsuselib
getgroupsnanosleepsethostidustat
gethostidnfsservctlsethostnameutime
gethostnamenicesetitimerutimes
getitimerobsoletesetpgidvfork
getpagesizeoldfstatsetpgrpvhangup
getpeernameoldlstatsetpriorityvm86
getpgidoldoldunamesetregidwait
getpgrpoldstatsetresgidwait3
getpidoldunamesetresuidwait4
getppidopensetreuidwaitpid
getpriorityoutbsetrlimitwrite
getresgidoutb_psetsidwritev
getresuidoutlsetsockopt 
getrlimitoutl_psettimeofday 
getrusageoutsbsetuid 
getsidoutslsetup 


Transmission 1.41 beta 2
Lightweight, yet powerful BitTorrent client
X-Moto 0.5.0
2D motocross platform game
Gdm 2.25.1
Reimplementation of the well known xdm program.
Linux Kernel 2.6 2.6.28-rc7
Linux Kernel
Linux Kernel 2.4 2.4.37
Linux Kernel
RIP 7.3
Small linux system for the purpose of system booting or repairing
GEdit 2.25.1
Small but powerful text editor
VLC media player 0.9.7
Cross-platform media player and streaming server
GNOME 2.25.2
GNOME desktop environment
WebGUI 7.6.5
A fully featured content management system.
Free IT Magazines, White Papers, eBooks, and more !
Oracle Magazine

Contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more.

eWeek

The essential technology information source for builders of e-business.

BusinessWeek (Digital Edition)

Provides readers a deeper understanding of the trends that drive growth, and what best practices keep them ahead of the competition.

Linux Software Map
Find Linux RPM
Best Rated Linux Software
Most Rated Linux Software
Linux Distributions
Linux Howtos
Quick Survey

Please take our survey and help us improve our website to serve you better.

Thank you.
Linux Software
Linux / IT Resources
Site Resources
Google
Privacy Policy
Contact Us
Submit Software
Advertising info