src/share/vm/memory/space.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Cdiff src/share/vm/memory/space.hpp

src/share/vm/memory/space.hpp

Print this page
rev 5732 : [mq]: comments2

*** 54,64 **** // implementations for keeping track of free and used space, // for iterating over objects and free blocks, etc. // Here's the Space hierarchy: // ! // - Space -- an asbtract base class describing a heap area // - CompactibleSpace -- a space supporting compaction // - CompactibleFreeListSpace -- (used for CMS generation) // - ContiguousSpace -- a compactible space in which all free space // is contiguous // - EdenSpace -- contiguous space used as nursery --- 54,64 ---- // implementations for keeping track of free and used space, // for iterating over objects and free blocks, etc. // Here's the Space hierarchy: // ! // - Space -- an abstract base class describing a heap area // - CompactibleSpace -- a space supporting compaction // - CompactibleFreeListSpace -- (used for CMS generation) // - ContiguousSpace -- a compactible space in which all free space // is contiguous // - EdenSpace -- contiguous space used as nursery
*** 157,167 **** // allocated at the time of the last call to "save_marks". If the space // initializes its DirtyCardToOopClosure's specifying the "contig" option // (that is, if the space is contiguous), then this region must contain only // such objects: the memregion will be from the bottom of the region to the // saved mark. Otherwise, the "obj_allocated_since_save_marks" method of ! // the space must distiguish between objects in the region allocated before // and after the call to save marks. virtual MemRegion used_region_at_save_marks() const { return MemRegion(bottom(), saved_mark_word()); } --- 157,167 ---- // allocated at the time of the last call to "save_marks". If the space // initializes its DirtyCardToOopClosure's specifying the "contig" option // (that is, if the space is contiguous), then this region must contain only // such objects: the memregion will be from the bottom of the region to the // saved mark. Otherwise, the "obj_allocated_since_save_marks" method of ! // the space must distinguish between objects in the region allocated before // and after the call to save marks. virtual MemRegion used_region_at_save_marks() const { return MemRegion(bottom(), saved_mark_word()); }
*** 188,198 **** bool is_empty() const { return used() == 0; } bool not_empty() const { return used() > 0; } // Returns true iff the given the space contains the // given address as part of an allocated object. For ! // ceratin kinds of spaces, this might be a potentially // expensive operation. To prevent performance problems // on account of its inadvertent use in product jvm's, // we restrict its use to assertion checks only. virtual bool is_in(const void* p) const = 0; --- 188,198 ---- bool is_empty() const { return used() == 0; } bool not_empty() const { return used() > 0; } // Returns true iff the given the space contains the // given address as part of an allocated object. For ! // certain kinds of spaces, this might be a potentially // expensive operation. To prevent performance problems // on account of its inadvertent use in product jvm's, // we restrict its use to assertion checks only. virtual bool is_in(const void* p) const = 0;
*** 242,258 **** // calling "cl.do_object_careful" on each. Return NULL if all objects // in the space (at the start of the iteration) were iterated over. // Return an address indicating the extent of the iteration in the // event that the iteration had to return because of finding an // uninitialized object in the space, or if the closure "cl" ! // signalled early termination. virtual HeapWord* object_iterate_careful(ObjectClosureCareful* cl); virtual HeapWord* object_iterate_careful_m(MemRegion mr, ObjectClosureCareful* cl); // Create and return a new dirty card to oop closure. Can be ! // overriden to return the appropriate type of closure // depending on the type of space in which the closure will // operate. ResourceArea allocated. virtual DirtyCardToOopClosure* new_dcto_cl(ExtendedOopClosure* cl, CardTableModRefBS::PrecisionStyle precision, HeapWord* boundary = NULL); --- 242,258 ---- // calling "cl.do_object_careful" on each. Return NULL if all objects // in the space (at the start of the iteration) were iterated over. // Return an address indicating the extent of the iteration in the // event that the iteration had to return because of finding an // uninitialized object in the space, or if the closure "cl" ! // signaled early termination. virtual HeapWord* object_iterate_careful(ObjectClosureCareful* cl); virtual HeapWord* object_iterate_careful_m(MemRegion mr, ObjectClosureCareful* cl); // Create and return a new dirty card to oop closure. Can be ! // overridden to return the appropriate type of closure // depending on the type of space in which the closure will // operate. ResourceArea allocated. virtual DirtyCardToOopClosure* new_dcto_cl(ExtendedOopClosure* cl, CardTableModRefBS::PrecisionStyle precision, HeapWord* boundary = NULL);
*** 472,488 **** // the object, insert an appropriate forwarding pointer in "q". // If not, go to the next compaction space (there must // be one, since compaction must succeed -- we go to the first space of // the previous generation if necessary, updating "cp"), reset compact_top // and then forward. In either case, returns the new value of "compact_top". ! // If the forwarding crosses "cp->threshold", invokes the "cross_threhold" // function of the then-current compaction space, and updates "cp->threshold // accordingly". virtual HeapWord* forward(oop q, size_t size, CompactPoint* cp, HeapWord* compact_top); ! // Return a size with adjusments as required of the space. virtual size_t adjust_object_size_v(size_t size) const { return size; } protected: // Used during compaction. HeapWord* _first_dead; --- 472,488 ---- // the object, insert an appropriate forwarding pointer in "q". // If not, go to the next compaction space (there must // be one, since compaction must succeed -- we go to the first space of // the previous generation if necessary, updating "cp"), reset compact_top // and then forward. In either case, returns the new value of "compact_top". ! // If the forwarding crosses "cp->threshold", invokes the "cross_threshold" // function of the then-current compaction space, and updates "cp->threshold // accordingly". virtual HeapWord* forward(oop q, size_t size, CompactPoint* cp, HeapWord* compact_top); ! // Return a size with adjustments as required of the space. virtual size_t adjust_object_size_v(size_t size) const { return size; } protected: // Used during compaction. HeapWord* _first_dead;
*** 498,508 **** return end(); } // Requires "allowed_deadspace_words > 0", that "q" is the start of a // free block of the given "word_len", and that "q", were it an object, ! // would not move if forwared. If the size allows, fill the free // block with an object, to prevent excessive compaction. Returns "true" // iff the free region was made deadspace, and modifies // "allowed_deadspace_words" to reflect the number of available deadspace // words remaining after this operation. bool insert_deadspace(size_t& allowed_deadspace_words, HeapWord* q, --- 498,508 ---- return end(); } // Requires "allowed_deadspace_words > 0", that "q" is the start of a // free block of the given "word_len", and that "q", were it an object, ! // would not move if forwarded. If the size allows, fill the free // block with an object, to prevent excessive compaction. Returns "true" // iff the free region was made deadspace, and modifies // "allowed_deadspace_words" to reflect the number of available deadspace // words remaining after this operation. bool insert_deadspace(size_t& allowed_deadspace_words, HeapWord* q,
src/share/vm/memory/space.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File