When running our custom Java application, the JVM often throws a “Failed to allocate memory” error. Does this happen because the OS is out of memory? How can we keep this from happening?
Our application is careful to minimize its RAM usage by doing things like reading files one line at a time, and I can sometimes run the application with a heap size of 5M without any problems. But other times I’ll run it with a heap size of 10M and get “failed to allocate memory” errors. So it doesn’t seem that we’re exceeding the max heap size.
Any help would be appreciated. Thanks!