question about Unsafe.allocateInstance

Florian Weimer fweimer at
Fri Dec 23 11:51:05 UTC 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 edv-consulting GmbH
Kriegsstraße 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99
hotspot-gc-use mailing list
hotspot-gc-use at

More information about the hotspot-gc-dev mailing list