morecore's comments indicate that we will failover to smallpage malloc if we run out of hugepages at runtime, but that is not the case. Modify one comment and remove another to not confuse anyone.
Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]> diff --git a/morecore.c b/morecore.c index 9f13316..08a356b 100644 --- a/morecore.c +++ b/morecore.c @@ -45,8 +45,8 @@ static long mapsize; * pretend there are none this covers us for the case where another * map is in the way. This is required because 'morecore' must have * 'sbrk' semantics, ie. return sequential, contigious memory blocks. - * Luckily, if it does not do so and we error out malloc will happily - * go back to small pages and use mmap to get them. Hurrah. + * Sufficient hugepages must be allocated before the malloc calls, or + * the application will be killed. */ static void *hugetlbfs_morecore(ptrdiff_t increment) @@ -153,8 +153,6 @@ static void __attribute__((constructor)) /* Set some allocator options more appropriate for hugepages */ mallopt(M_TRIM_THRESHOLD, blocksize / 2); mallopt(M_TOP_PAD, blocksize / 2); - /* we always want to use our morecore, not ordinary mmap(). - * This doesn't appear to prohibit malloc() from falling back - * to mmap() if we run out of hugepages. */ + /* we always want to use our morecore, not ordinary mmap(). */ mallopt(M_MMAP_MAX, 0); } -- Nishanth Aravamudan <[EMAIL PROTECTED]> IBM Linux Technology Center ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Libhugetlbfs-devel mailing list Libhugetlbfs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel