I've small Linux server (VPS) with 1GB of RAM i want to give Java VM only 256MB is there an option to limit Java VM to that memory size, so when I excede that limit I start to catch OutOfMemory Exception
The main problem that when load exceed on memroy I shall return overload error, and this is an accepted reponse, but the problem Java keeps going eating system memory that shall be free for other programs by force!!
Yes, I need to minimize the memory, because the Server is not dedicated for Java only and exceeding memory for the sack of Java is not an option.
and if there is no Java option that way, shall I go for C++ for linux develpment, complixety, threading or memory management is not a problem since this Java program is just a dedicated service