MetaWord* Metaspace::allocate(ClassLoaderData* loader_data, size_t word_size,
MetaspaceObj::Type type, TRAPS) {
+ assert(!THREAD->is_VM_thread(), "metaspace allocation may cause GC, but GC cannot be started in VM thread")
Comments
Runtime Triage: This is not on our current list of priorities. We will consider this feature if we receive additional customer requirements.
29-01-2019
If metaspace allocation fails, it calls GC which then tries to do the allocation within the GC, so it can be called from the VMThread. I tried to think of how to change this at the time but there were reasons it was this way.