Home | History | Annotate | Download | only in heap

Lines Matching defs:Space

40 class Space;
46 // object space. The young generation is divided into two semispaces. A
48 // separated into a map space and an old object space. The map space contains
49 // all (and only) map objects, the rest of old objects go into the old space.
56 // There is a separate large object space for objects larger than
58 // collection. The large object space is paged. Pages in large object space
66 // object maps so if the page belongs to old space or large object space
68 // garbage pointers to new space: every pointer aligned word which satisfies
70 // new space. Thus objects in old space and large object spaces should have a
72 // apply to map space which is iterated in a special fashion. However we still
75 // To enable lazy cleaning of old space pages we can mark chunks of the page
82 // into new space.
85 // section is denoted by the top field in the space. The end of the section
86 // is denoted by the limit field in the space. This special garbage section
87 // is not marked with a free space map in the data. The point of this section
92 // Since the top and limit fields are in the space, not the page, only one page
402 // MemoryChunk represents a memory region owned by a specific space.
413 IN_TO_SPACE, // All pages in new space has one of these two set.
425 // from new to old space during evacuation.
429 // within the new space during evacuation.
539 // We add some more space to the computed header size to amount for missing
756 Space* owner() const {
759 return reinterpret_cast<Space*>(reinterpret_cast<intptr_t>(owner_) -
766 void set_owner(Space* space) {
767 DCHECK((reinterpret_cast<intptr_t>(space) & kPageHeaderTagMask) == 0);
768 owner_ = reinterpret_cast<Address>(space) + kPageHeaderTag;
781 Executability executable, Space* owner,
799 // The identity of the owning space. This is tagged as a failure pointer, but
863 // Page flags copied from from-space to to-space when flipping semispaces.
869 // than that size are allocated in large object space and are never moved in
870 // memory. This also applies to new space allocation, since objects are never
871 // migrated from new space to large object space. Takes double alignment into
894 // Checks if address1 and address2 are on the same new space page.
913 explicit Page(Space* owner) { InitializeAsAnchor(owner); }
991 void InitializeAsAnchor(Space* owner);
1014 Executability executable, Space* owner);
1021 // Space is the abstract superclass for all allocation spaces.
1022 class Space : public Malloced {
1024 Space(Heap* heap, AllocationSpace id, Executability executable)
1033 virtual ~Space() {}
1037 // Does the space need executable memory?
1063 // Return the total amount committed memory for this space, i.e., allocatable
1076 // Approximate amount of physical memory committed for this space.
1117 // Keeps track of committed memory in a space.
1144 // displacements cover the entire 4GB virtual address space. On 64-bit
1293 // A space acquires chunks of memory from the operating system. The memory
1295 // pages for large object space.
1396 // Max capacity of the total space and executable memory limit.
1436 // Returns maximum available bytes that the old space can have.
1441 // Returns an indication of whether a pointer is in a space that has
1449 // Reports statistic info of the space.
1458 Space* space);
1499 static int PageAreaSize(AllocationSpace space) {
1500 DCHECK_NE(LO_SPACE, space);
1501 return (space == CODE_SPACE) ? CodePageAreaSize()
1529 // Maximum space size in bytes.
1534 // Allocated space size in bytes.
1536 // Allocated executable space size in bytes.
1541 // conservative, i.e. not all addrsses in 'allocated' space are allocated
1549 // collector to rebuild page headers in the from space, which is
1577 // Interface for heap object iterator to be implemented by all object space
1580 // NOTE: The space specific object iterators also implements the own next()
1582 // iterating a specific space.
1629 // A HeapObjectIterator iterates objects from the bottom of the given space
1637 // Creates a new object iterator in a given space.
1638 explicit HeapObjectIterator(PagedSpace* space);
1642 // skipping the special garbage section of which there is one per space.
1663 // A space has a circular list of pages. The next page can be accessed via
1667 // space.
1718 // An abstraction of the accounting statistics of a page-structured space.
1745 // Grow the space by adding available bytes. They are initially marked as
1757 // Shrink the space by removing available bytes. Since shrinking is done
1798 // bookkeeping structures) currently in the space.
1812 // find a new space to allocate from. This is done with the free list, which is
1821 // 32-255 words (small): Used for allocating free space between 1-31 words in
1823 // 256-2047 words (medium): Used for allocating free space between 32-255 words
1825 // 1048-16383 words (large): Used for allocating free space between 256-2047
2020 // failure and the space to retry in.
2026 static inline AllocationResult Retry(AllocationSpace space = NEW_SPACE) {
2027 return AllocationResult(space);
2047 explicit AllocationResult(AllocationSpace space)
2048 : object_(Smi::FromInt(static_cast<int>(space))) {}
2121 class PagedSpace : public Space {
2127 // Creates a space with an id.
2132 // Set up the space using the given address range of virtual memory (from
2138 // Returns true if the space has been successfully set up and not
2142 // Checks whether an object/address is in this space.
2148 // in this space, or a Smi if it is not. The implementation iterates over
2163 // Approximate amount of physical memory committed for this space.
2168 // Sets the capacity, the available space and the wasted space to zero.
2185 // Allocated bytes in this space. Garbage bytes that were not found due to
2195 // Wasted bytes in this space. These are just the bytes that were thrown away
2199 // Returns the allocation pointer in this space.
2213 // Allocate the requested number of bytes in the space if possible, return a
2222 // Allocate the requested number of bytes in the space double aligned if
2227 // Allocate the requested number of bytes in the space and consider allocation
2232 // Give a block of memory to the space's free list. It might be added to
2249 // Set space allocation info.
2257 // Empty space allocation info, returning unused area to free list.
2259 // Mark the old linear allocation area with a free space map so it can be
2270 // Releases an unused page and shrinks the space.
2283 // Verify integrity of this space.
2286 // Overridden by subclasses to verify space-specific object
2287 // properties (e.g., only maps or free-list nodes are in map space).
2292 // Print meta info and objects in this space.
2295 // Reports statistics for the space
2310 // Returns the number of total pages in this space.
2313 // Return size of allocatable area on a page in this space.
2318 // Merges {other} into the current space. Note that this modifies {other},
2343 // Cleans up the space, frees all pages in this space except those belonging
2347 // Expands the space by allocating a fixed number of pages. Returns false if
2368 // Slow path of AllocateRaw. This function is space-dependent.
2373 // Accounting information for this space.
2379 // The space's free list.
2385 // Mutex guarding any concurrent access to the space.
2437 // space as a marking stack when tracing live objects.
2438 class SemiSpace : public Space {
2445 : Space(heap, NEW_SPACE, NOT_EXECUTABLE),
2479 // Returns the start address of the first page of the space.
2489 // Returns one past the end address of the space.
2492 // Returns the start address of the current page of the space.
2495 // Returns one past the end address of the current page of the space.
2512 // Resets the space to using the first page.
2533 // Approximate amount of physical memory committed for this space.
2575 // Copies the flags into the masked positions on all pages in the space.
2578 // The currently committed space capacity.
2581 // The maximum capacity that can be used by this space. A space cannot grow
2585 // The minimum capacity for the space. A space cannot shrink below this size.
2604 // semispace of the heap's new space. It iterates over the objects in the
2610 // Create an iterator over the allocated objects in the given to-space.
2611 explicit SemiSpaceIterator(NewSpace* space);
2625 // The young generation space.
2627 // The new space consists of a contiguous pair of semispaces. It simply
2630 class NewSpace : public Space {
2635 : Space(heap, NEW_SPACE, NOT_EXECUTABLE),
2649 // Tears down the space. Heap memory was not allocated by the space, so it
2653 // True if the space has been set up but not torn down.
2676 // new space, which can't get as big as the other spaces then this is useful:
2704 // Approximate amount of physical memory committed for this space.
2833 // or to zap it). Notice: space-addresses are not necessarily on the
2875 // to space during a scavenge GC.
2901 // Update allocation info to match the current to-space page.
2927 // different when we cross a page boundary or reset the space.
2947 // Compaction space that is used temporarily during compaction.
2957 // The space is temporary and not included in any snapshots.
2972 CompactionSpace* Get(AllocationSpace space) {
2973 switch (space) {
2992 // Old object space (includes the old space of objects and code space)
2996 // Creates an old space object. The constructor does not allocate pages
3003 // For contiguous spaces, top should be in the space (or at the end) and limit
3004 // should be the end of the space.
3005 #define DCHECK_SEMISPACE_ALLOCATION_INFO(info, space) \
3006 SLOW_DCHECK((space).page_low() <= (info).top() && \
3007 (info).top() <= (space).page_high() && \
3008 (info).limit() <= (space).page_high())
3012 // Old space for all map objects
3016 // Creates a map space object.
3036 // managed by the large object space. A large object is allocated from OS
3041 class LargeObjectSpace : public Space {
3051 // Releases internal resources, frees objects in this space.
3064 // Available bytes for objects in this space.
3071 // Approximate amount of physical memory committed for this space.
3077 // The function iterates through all objects in this space, may be slow.
3090 // Checks whether a heap object is in this space; O(1).
3092 // Checks whether an address is in the object area in this space. Iterates
3093 // all objects in the space. May be slow.
3096 // Checks whether the space is empty.
3133 explicit LargeObjectIterator(LargeObjectSpace* space);
3142 // pointers to new space or to evacuation candidates.