On 11.04.2008 [17:26:33 -0700], Eric B Munson wrote:
> Ensure that the locked memory limit is bigger than a huge page before trying
> the test.
>
> Signed-off-by: Eric Munson <[EMAIL PROTECTED]>
>
> ---
>
> tests/mlock.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff -upNr libhugetlbfs-1.3-pre1.orig/tests/mlock.c
> libhugetlbfs-1.3-pre1/tests/mlock.c
> --- libhugetlbfs-1.3-pre1.orig/tests/mlock.c 2008-04-11 16:11:52.000000000
> -0700
> +++ libhugetlbfs-1.3-pre1/tests/mlock.c 2008-04-11 17:06:46.000000000
> -0700
> @@ -25,6 +25,7 @@
> #include <string.h>
> #include <errno.h>
> #include <sys/mman.h>
> +#include <sys/resource.h>
>
> #include <hugetlbfs.h>
> #include "hugetests.h"
> @@ -57,6 +58,11 @@ static void test_simple_mlock(int flags)
>
> int main(int argc, char *argv[])
> {
> + struct rlimit limit_info;
> + if(getrlimit(RLIMIT_MEMLOCK, &limit_info))
> + ERROR("Unable to read locked memory rlimit: %s",
> strerror(errno));
> + if(limit_info.rlim_cur < gethugepagesize())
> + CONFIG("Locked memory ulimit set below huge page size");
Should this be using check_gethugepagesize(), to avoid odd CONFIG()
failures with gigantic pages on 32-bit process?
Thanks,
Nish
--
Nishanth Aravamudan <[EMAIL PROTECTED]>
IBM Linux Technology Center
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Libhugetlbfs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel