RFR: 8000617: It should be possible to allocate memory without the VM dying.
Nils Loodin
nils.loodin at oracle.com
Wed Oct 17 04:11:48 PDT 2012
>
>> Any references to 'throw_constant' instead of 'nothrow_constant' is a
>> typo and can safely be disregarded!
>>
Well, I'm open for a name-discussion anyway :)
>
> Ummm there is tracing of the malloc calls:
>
> 94 void* p = os::malloc(size, F, (caller_pc != 0 ? caller_pc :
> CALLER_PC));
>
> 95 if (PrintMallocFree) trace_heap_malloc(size, "CHeapObj-new", p);
That was from allocation.inline.hpp and is hidden behind an #ifdef
ASSERT. the #elseif is
return os::malloc(size, F, (caller_pc != 0 ? caller_pc : CALLER_PC)); ..
Also in thread.cpp there is no tracing, just an os:malloc:
return throw_excpt? AllocateHeap(size, flags, CURRENT_PC)
- : os::malloc(size, flags, CURRENT_PC);
+ : AllocateHeap(size, flags, CURRENT_PC,
AllocFailStrategy::RETURN_NULL);
So I wouldn't say that these os::malloc calls contain tracing...
Regards,
Nils Loodin
More information about the hotspot-dev
mailing list