private static native int mlockall(int flags);

private static native int mlockall ( int flags ) ;
invokes mlockall ( ) . locks all pages mapped into the address space of the calling process . this includes the pages of the code , data and stack segment , as well as shared libraries , user space kernel data , shared memory , and memory - mapped files . all mapped pages are guaranteed to be resident in ram when the call returns successfully ; the pages are guaranteed to stay in ram until later unlocked .
