diff --git a/src/share/vm/memory/allocation.cpp b/src/share/vm/memory/allocation.cpp index abba20bcd3a5bf450944aaa7c725e3b730702ea6..5bc2bc163a0f57ca02970b85a4707a1d6b6c645b 100644 --- a/src/share/vm/memory/allocation.cpp +++ b/src/share/vm/memory/allocation.cpp @@ -561,6 +561,7 @@ void* Arena::grow(size_t x, AllocFailType alloc_failmode) { _chunk = new (alloc_failmode, len) Chunk(len); if (_chunk == NULL) { + _chunk = k; // restore the previous value of _chunk return NULL; } if (k) k->set_next(_chunk); // Append new chunk to end of linked list