Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
JVMTI agent which calls mlockall and setuids down to a target user upon initialization
C Shell
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README Add simple README Add -Wall
mlockall_agent.c Address warnings, deal with case where no agent parameters are specified



mlockall_agent is a simple JVMTI agent that runs a small piece of code at JVM start time.

This code does the following:
- Raises the current process's resource limit for locked memory
- Calls mlockall() to lock all current and future allocations in wired memory
- Sets the current userid and group list to match a target user
- Continues on JVM initialization


Simply add the following JVM argument to the Java command line:

Then, run the Java process as root.

If the Java command line is obscured within a script, you can also use the JAVA_TOOL_OPTIONS
environment variable for the same effect.
Something went wrong with that request. Please try again.