However you should be aware of the performance impact of garbage collection when allocating large amounts of RAM to your java process.
The more RAM you allocate, the longer the garbage collection pauses get (stop the world). On our HP-UX IA64 Systems, we tend not to use more than 2GB HEAP (which results in about 4GB total RSS process memory) for our web application servers, as FULL GC pauses get as high as 6-8 seconds (which is already bad from a user perspective, as the applications become unresponsive for this time).