OutOfMemoryError on [codegc ] Could not acquire 2MB of code memory when using Large Pages.
Last updated on JUNE 11, 2018
Applies to:Oracle JRockit - Version R28 and later
Information in this document applies to any platform.
If you are seeing an Native Out of memory error on code generation like the following:
[WARN ][codegc ] Could not acquire 2MB of code memory.
[WARN ][codegc ] 64MB committed previously.
java.lang.OutOfMemoryError: CG #
This Means you have reached the maximum memory available for code generation.
If you hit this Error it means you have the Max Code Memory as 64MB, which if you are not explicitly setting it to this value is being assigned as default. This can happen when enabling Large Pages support on the JVM.
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms