get_huge_pages man page on SuSE

Man page or keyword search:  
man Server   14857 pages
apropos Keyword Search (all sections)
Output format
SuSE logo
[printable version]

GET_HUGE_PAGES(3)					     GET_HUGE_PAGES(3)

NAME
       get_huge_pages, free_huge_pages - Allocate and free hugepages

SYNOPSIS
       #include <hugetlbfs.h>

       void *get_huge_pages(size_t len, ghp_t flags);
       void free_huge_pages(void *ptr);

DESCRIPTION
       get_huge_pages()	 allocates a memory region len bytes in size backed by
       hugepages. Hugepages may be of benefit to applications that  use	 large
       amounts	of  address  space  and suffer a  performance hit  due to  TLB
       misses.	Wall-clock  time or oprofile can be used to determine if there
       is a performance benefit from using hugepages or not.

       The  len parameter must be hugepage-aligned. In the current implementa‐
       tion, only the default hugepage size may be allocated  via  this	 func‐
       tion. Use gethugepagesize to discover what the alignment should be.

       The  flags argument changes the behaviour of the function. Flags may be
       or'd together.

       GHP_DEFAULT

	      Allocate a region of memory of the requested  length  backed  by
	      hugepages	 of  the  default hugepage size. Return NULL if suffi‐
	      cient pages are not available

       free_huge_pages()   frees   a   region	of   memory    allocated    by
       get_huge_pages().  The  behaviour of the function if another pointer is
       used, valid or otherwise, is undefined.

RETURN VALUE
       On success, a pointer is returned to the allocated  memory.  On	error,
       NULL is returned. errno will be set based on what the failure of mmap()
       was due to.

SEE ALSO
       oprofile(1)  ,  gethugepagesize(3)  ,  get_hugepage_region(3)  ,	  lib‐
       hugetlbfs(7)

AUTHORS
       libhugetlbfs  was  written  by various people on the libhugetlbfs-devel
       mailing list.

				October 8, 2008		     GET_HUGE_PAGES(3)
[top]

List of man pages available for SuSE

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net