question about Unsafe.allocateInstance

Florian Weimer fweimer at bfk.de
Fri Dec 23 03:51:05 PST 2011


* Li Li:

>      And I also find a method named allocateInstance, which seems what I
> want.

allocateInstance() allocates objects on the Java heap, just like new.
I'm pretty sure that there is no way at all to allocate instances
which are not on the Java heap and subject to garbage collection.

-- 
Florian Weimer                <fweimer at bfk.de>
BFK edv-consulting GmbH       http://www.bfk.de/
Kriegsstraße 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99


More information about the hotspot-gc-use mailing list