< prev index next >

src/hotspot/share/gc/shared/memAllocator.cpp

Print this page

        

*** 344,369 **** tlab.fill(mem, mem + _word_size, allocation._allocated_tlab_size); return mem; } ! HeapWord* MemAllocator::mem_allocate(Allocation& allocation) const { ! if (UseTLAB) { HeapWord* result = allocate_inside_tlab(allocation); if (result != NULL) { return result; } } return allocate_outside_tlab(allocation); } ! oop MemAllocator::allocate() const { oop obj = NULL; { Allocation allocation(*this, &obj); ! HeapWord* mem = mem_allocate(allocation); if (mem != NULL) { obj = initialize(mem); } else { // The unhandled oop detector will poison local variable obj, // so reset it to NULL if mem is NULL. --- 344,369 ---- tlab.fill(mem, mem + _word_size, allocation._allocated_tlab_size); return mem; } ! HeapWord* MemAllocator::mem_allocate(Allocation& allocation, bool try_tlab) const { ! if (UseTLAB && try_tlab) { HeapWord* result = allocate_inside_tlab(allocation); if (result != NULL) { return result; } } return allocate_outside_tlab(allocation); } ! oop MemAllocator::allocate(bool try_tlab) const { oop obj = NULL; { Allocation allocation(*this, &obj); ! HeapWord* mem = mem_allocate(allocation, try_tlab); if (mem != NULL) { obj = initialize(mem); } else { // The unhandled oop detector will poison local variable obj, // so reset it to NULL if mem is NULL.
< prev index next >