[jboss-dev] testing memory leaks
    Jonathan Halliday 
    jonathan.halliday at redhat.com
       
    Wed Nov  4 08:42:19 EST 2009
    
    
  
Hi all
I'm looking for a way to force garbage collection to run, as 
I need it in order to write meaningful memory leak tests.
As far as I can tell, there is no way for force gc from 
inside the jvm, short of hacks like allocating all the 
remaining free memory.
The best I can come up with so far is a bit of native code 
to call gc via the jvmti. This is a pain, as it means 
compiling for every test platform.
Anyone got a better idea?
Thanks
Jonathan.
-- 
------------------------------------------------------------
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 
Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom.
Registered in UK and Wales under Company Registration No. 
3798903  Directors: Michael Cunningham (USA), Charlie Peters 
(USA), Matt Parsons (USA) and Brendan Lane (Ireland)
    
    
More information about the jboss-development
mailing list