Hi Mike.  I've cc'ed our development list on this reply...

You have a number of options for using the library depending on your
needs.  

If you would like to transparently back all of your application's malloc
calls with huge pages, you can use the library as an LD_PRELOAD and
specify HUGETLB_MORECORE=yes in the environment. 

If you prefer to manually allocate huge pages, we provide
hugetlbfs_unlinked_fd().  This function locates a mounted hugetlbfs
filesystem and returns an open and unlinked file descriptor created on
that fs.  This fd is ready for calls to mmap().  See the tests/
directory for programming examples.

Hope this helps :)  

On Tue, 2007-10-02 at 14:53 -0500, Mike Kistler wrote:
> Hello David, Adam,
> 
> I am looking at libhugetlbfs and it looks like it could be very useful
> to me in my current project. I am particularly interested in using the
> library functions described in the HOWTO:
> 
> * library functions
> libhugetlbfs provides functions that allow an applications to
> explicitly allocate and use hugepages more easily they could by
> directly accessing the hugetblfs filesystem
> 
> I am not ready to change every malloc in my application (which I did
> not write) into an allocation from large huge pages, but I can easily
> identify and change the allocations for the key structures that need
> to be in large pages.
> 
> So my question is ... what are the library functions I can call to get
> large page storage? I don't see anything obvious in hugetlbfs.h, and I
> couldn't find any other header files that looked like they contain
> prototypes for the library externals.
> 
> Thanks in advance.
> 
> Regards,
> Mike
-- 
Adam Litke - (agl at us.ibm.com)
IBM Linux Technology Center


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Libhugetlbfs-devel mailing list
Libhugetlbfs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel

Reply via email to