355 // Return the next threshold, the point at which the table should be
356 // updated.
357 HeapWord* threshold() const { return _next_offset_threshold; }
358
359 // These must be guaranteed to work properly (i.e., do nothing)
360 // when "blk_start" ("blk" for second version) is "NULL". In this
361 // implementation, that's true because NULL is represented as 0, and thus
362 // never exceeds the "_next_offset_threshold".
363 void alloc_block(HeapWord* blk_start, HeapWord* blk_end) {
364 if (blk_end > _next_offset_threshold) {
365 alloc_block_work1(blk_start, blk_end);
366 }
367 }
368 void alloc_block(HeapWord* blk, size_t size) {
369 alloc_block(blk, blk+size);
370 }
371
372 HeapWord* block_start_unsafe(const void* addr);
373 HeapWord* block_start_unsafe_const(const void* addr) const;
374
375 void set_for_starts_humongous(HeapWord* obj_top);
376
377 virtual void print_on(outputStream* out) PRODUCT_RETURN;
378 };
379
380 #endif // SHARE_VM_GC_G1_G1BLOCKOFFSETTABLE_HPP
|
355 // Return the next threshold, the point at which the table should be
356 // updated.
357 HeapWord* threshold() const { return _next_offset_threshold; }
358
359 // These must be guaranteed to work properly (i.e., do nothing)
360 // when "blk_start" ("blk" for second version) is "NULL". In this
361 // implementation, that's true because NULL is represented as 0, and thus
362 // never exceeds the "_next_offset_threshold".
363 void alloc_block(HeapWord* blk_start, HeapWord* blk_end) {
364 if (blk_end > _next_offset_threshold) {
365 alloc_block_work1(blk_start, blk_end);
366 }
367 }
368 void alloc_block(HeapWord* blk, size_t size) {
369 alloc_block(blk, blk+size);
370 }
371
372 HeapWord* block_start_unsafe(const void* addr);
373 HeapWord* block_start_unsafe_const(const void* addr) const;
374
375 void set_for_starts_humongous(HeapWord* end);
376
377 virtual void print_on(outputStream* out) PRODUCT_RETURN;
378 };
379
380 #endif // SHARE_VM_GC_G1_G1BLOCKOFFSETTABLE_HPP
|