src/share/vm/utilities/growableArray.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/src/share/vm/utilities/growableArray.hpp	Mon Aug  2 14:26:21 2010
--- new/src/share/vm/utilities/growableArray.hpp	Mon Aug  2 14:26:21 2010

*** 95,105 **** --- 95,106 ---- _len = initial_len; _max = initial_size; assert(_len >= 0 && _len <= _max, "initial_len too big"); _arena = (c_heap ? (Arena*)1 : NULL); set_nesting(); ! assert(!c_heap || allocated_on_C_heap(), "growable array must be on C heap if elements are"); ! assert(!on_C_heap() || allocated_on_C_heap(), "growable array must be on C heap if elements are"); + assert(!on_stack () || allocated_on_stack(), "growable array must be on stack if elements are not on arena and not on C heap"); } // This GA will use the given arena for storage. // Consider using new(arena) GrowableArray<T> to allocate the header. GenericGrowableArray(Arena* arena, int initial_size, int initial_len) {
*** 106,115 **** --- 107,118 ---- _len = initial_len; _max = initial_size; assert(_len >= 0 && _len <= _max, "initial_len too big"); _arena = arena; assert(on_arena(), "arena has taken on reserved value 0 or 1"); + // Relax next assert to allow object allocation on resource area, stack or part of other object. + assert(allocated_on_arena() || allocated_on_stack(), "growable array must be on arena or on stack if elements are on arena"); } void* raw_allocate(int elementSize); // some uses pass the Thread explicitly for speed (4990299 tuning)

src/share/vm/utilities/growableArray.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File