326 // first iteration through the while loop.
327 HeapWord* last_p = NULL;
328 HeapWord* last_start = NULL;
329 oop last_o = NULL;
330
331 while (next_index <= last_index) {
332 // Use an address past the start of the address for
333 // the entry.
334 HeapWord* p = _array->address_for_index(next_index) + 1;
335 if (p >= _end) {
336 // That's all of the allocated block table.
337 return;
338 }
339 // block_start() asserts that start <= p.
340 HeapWord* start = block_start(p);
341 // First check if the start is an allocated block and only
342 // then if it is a valid object.
343 oop o = oop(start);
344 assert(!Universe::is_fully_initialized() ||
345 _sp->is_free_block(start) ||
346 o->is_oop_or_null(), "Bad object was found");
347 next_index++;
348 last_p = p;
349 last_start = start;
350 last_o = o;
351 }
352 }
353
354 //////////////////////////////////////////////////////////////////////
355 // BlockOffsetArrayNonContigSpace
356 //////////////////////////////////////////////////////////////////////
357
358 // The block [blk_start, blk_end) has been allocated;
359 // adjust the block offset table to represent this information;
360 // NOTE: Clients of BlockOffsetArrayNonContigSpace: consider using
361 // the somewhat more lightweight split_block() or
362 // (when init_to_zero()) mark_block() wherever possible.
363 // right-open interval: [blk_start, blk_end)
364 void
365 BlockOffsetArrayNonContigSpace::alloc_block(HeapWord* blk_start,
366 HeapWord* blk_end) {
|
326 // first iteration through the while loop.
327 HeapWord* last_p = NULL;
328 HeapWord* last_start = NULL;
329 oop last_o = NULL;
330
331 while (next_index <= last_index) {
332 // Use an address past the start of the address for
333 // the entry.
334 HeapWord* p = _array->address_for_index(next_index) + 1;
335 if (p >= _end) {
336 // That's all of the allocated block table.
337 return;
338 }
339 // block_start() asserts that start <= p.
340 HeapWord* start = block_start(p);
341 // First check if the start is an allocated block and only
342 // then if it is a valid object.
343 oop o = oop(start);
344 assert(!Universe::is_fully_initialized() ||
345 _sp->is_free_block(start) ||
346 oopDesc::is_oop_or_null(o), "Bad object was found");
347 next_index++;
348 last_p = p;
349 last_start = start;
350 last_o = o;
351 }
352 }
353
354 //////////////////////////////////////////////////////////////////////
355 // BlockOffsetArrayNonContigSpace
356 //////////////////////////////////////////////////////////////////////
357
358 // The block [blk_start, blk_end) has been allocated;
359 // adjust the block offset table to represent this information;
360 // NOTE: Clients of BlockOffsetArrayNonContigSpace: consider using
361 // the somewhat more lightweight split_block() or
362 // (when init_to_zero()) mark_block() wherever possible.
363 // right-open interval: [blk_start, blk_end)
364 void
365 BlockOffsetArrayNonContigSpace::alloc_block(HeapWord* blk_start,
366 HeapWord* blk_end) {
|