Max heap limited when running with a JVMTI agent?

Running an app with a JVMTI agent, I cannot specify a max heap greater than 320Mb, even on a 1Gb machine with hardly anything running. Specifying for example -Xms256m -Xmx512m results in following error:

Error occurred during initialization of VM

Could not reserve enough space for object heap

Could not create the Java virtual machine.

No problem at all with a JVMPI agent.

Anyone any ideas?

Thanks,

Luc

[453 byte] By [cfhlap0a] at [2007-10-3 1:21:18]
# 1

JVM TI agent libraries are loaded very early in the startup and before the java heap is reserved. JVMPI agents, on the other hand, are loaded much later in the startup. You didn't mention which operating system this is but I assume it's Windows. If so, then you may need need to rebase the agent DLL to allow the java heap be reserved.

alan.batemana at 2007-7-14 18:18:31 > top of Java-index,Java HotSpot Virtual Machine,Specifications...