Mercurial > hg > truffle
comparison src/share/vm/memory/generation.hpp @ 263:12eea04c8b06
6672698: mangle_unused_area() should not remangle the entire heap at each collection.
Summary: Maintain a high water mark for the allocations in a space and mangle only up to that high water mark.
Reviewed-by: ysr, apetrusenko
author | jmasa |
---|---|
date | Wed, 09 Jul 2008 15:08:55 -0700 |
parents | ba764ed4b6f2 |
children | 850fdf70db2b |
comparison
equal
deleted
inserted
replaced
225:286bee59f34b | 263:12eea04c8b06 |
---|---|
374 | 374 |
375 // Some generations may require some cleanup actions after a collection. | 375 // Some generations may require some cleanup actions after a collection. |
376 // The default is to do nothing. | 376 // The default is to do nothing. |
377 virtual void gc_epilogue(bool full) {}; | 377 virtual void gc_epilogue(bool full) {}; |
378 | 378 |
379 // Save the high water marks for the used space in a generation. | |
380 virtual void record_spaces_top() {}; | |
381 | |
379 // Some generations may need to be "fixed-up" after some allocation | 382 // Some generations may need to be "fixed-up" after some allocation |
380 // activity to make them parsable again. The default is to do nothing. | 383 // activity to make them parsable again. The default is to do nothing. |
381 virtual void ensure_parsability() {}; | 384 virtual void ensure_parsability() {}; |
382 | 385 |
383 // Time (in ms) when we were last collected or now if a collection is | 386 // Time (in ms) when we were last collected or now if a collection is |
474 // it to "list", leaving "list" pointing to the head of the | 477 // it to "list", leaving "list" pointing to the head of the |
475 // augmented list. The default is to offer no space. | 478 // augmented list. The default is to offer no space. |
476 virtual void contribute_scratch(ScratchBlock*& list, Generation* requestor, | 479 virtual void contribute_scratch(ScratchBlock*& list, Generation* requestor, |
477 size_t max_alloc_words) {} | 480 size_t max_alloc_words) {} |
478 | 481 |
482 // Give each generation an opportunity to do clean up for any | |
483 // contributed scratch. | |
484 virtual void reset_scratch() {}; | |
485 | |
479 // When an older generation has been collected, and perhaps resized, | 486 // When an older generation has been collected, and perhaps resized, |
480 // this method will be invoked on all younger generations (from older to | 487 // this method will be invoked on all younger generations (from older to |
481 // younger), allowing them to resize themselves as appropriate. | 488 // younger), allowing them to resize themselves as appropriate. |
482 virtual void compute_new_size() = 0; | 489 virtual void compute_new_size() = 0; |
483 | 490 |
697 | 704 |
698 virtual void prepare_for_verify(); | 705 virtual void prepare_for_verify(); |
699 | 706 |
700 virtual void gc_epilogue(bool full); | 707 virtual void gc_epilogue(bool full); |
701 | 708 |
709 virtual void record_spaces_top(); | |
710 | |
702 virtual void verify(bool allow_dirty); | 711 virtual void verify(bool allow_dirty); |
703 virtual void print_on(outputStream* st) const; | 712 virtual void print_on(outputStream* st) const; |
704 }; | 713 }; |