< prev index next >

src/share/vm/gc/g1/g1CollectedHeap.hpp

Print this page
rev 8461 : imported patch webrev1.patch
rev 8462 : [mq]: version3

*** 573,582 **** --- 573,586 ---- HeapRegion* new_gc_alloc_region(size_t word_size, uint count, InCSetState dest); void retire_gc_alloc_region(HeapRegion* alloc_region, size_t allocated_bytes, InCSetState dest); + // Allocate the highest free region in the reserved heap. This will commit + // regions as necessary. + HeapRegion* alloc_highest_free_region(); + // - if explicit_gc is true, the GC is for a System.gc() or a heap // inspection request and should collect the entire heap // - if clear_all_soft_refs is true, all soft references should be // cleared during the GC // - if explicit_gc is false, word_size describes the allocation that
*** 731,767 **** // up. The assumption is that this will be done later. void free_humongous_region(HeapRegion* hr, FreeRegionList* free_list, bool par); ! // Facility for allocating in 'archive' regions in high heap memory from ! // the VM thread, and recording the allocated ranges. The end_ call ! // optionally aligns the end address and returns the allocated ranges as ! // an ascending array of MemRegions. This can be used to create and ! // archive a heap region which can be mapped at the same fixed addresses ! // in a future JVM instance. void begin_archive_alloc_range(); ! void end_archive_alloc_range(GrowableArray<MemRegion>* ranges, ! uint end_alignment = 0); bool is_archive_alloc_too_large(size_t word_size); HeapWord* archive_mem_allocate(size_t word_size); - HeapRegion* alloc_highest_available_region(); ! // Facility for allocating a fixed range within the heap and marking ! // the containing regions as 'archive'. For use at JVM init time, when the caller ! // may mmap archived heap data at the specified range(s). The check_ call ! // verifies that the regions are within the reserved heap. The alloc_ call ! // commits the appropriate regions and marks them as 'archive," after which ! // the caller can perform the mmap. The fill_ call (which must occur after class ! // loading) inserts any required filler objects around the specified ranges ! // to make the regions parseable. ! bool check_archive_addresses(MemRegion* range, uint count); ! bool alloc_archive_regions(MemRegion* range, uint count); ! void fill_archive_regions(MemRegion* range, uint count); ! // Fill the requested space without creating any humongous objects. ! static void fill_with_non_humongous_objects(HeapWord* base_address, size_t word_size); protected: // Shrink the garbage-first heap by at most the given size (in bytes!). // (Rounds down to a HeapRegion boundary.) --- 735,780 ---- // up. The assumption is that this will be done later. void free_humongous_region(HeapRegion* hr, FreeRegionList* free_list, bool par); ! // Facility for allocating in 'archive' regions in high heap memory and ! // recording the allocated ranges. These should all be called from the ! // VM thread at safepoints, without the heap lock held. They can be used ! // to create and archive a set of heap regions which can be mapped at the ! // same fixed addresses in a subsequent JVM invocation. void begin_archive_alloc_range(); ! ! // Check if the requested size would be too large for an archive allocation. bool is_archive_alloc_too_large(size_t word_size); + + // Allocate memory of the requested size from the archive region. This will + // return NULL if the size is too large or if no memory is available. It + // does not trigger a garbage collection. HeapWord* archive_mem_allocate(size_t word_size); ! // Optionally aligns the end address and returns the allocated ranges in ! // an array of MemRegions in order of ascending addresses. ! void end_archive_alloc_range(GrowableArray<MemRegion>* ranges, ! size_t end_alignment_in_bytes = 0); ! // Facility for allocating a fixed range within the heap and marking ! // the containing regions as 'archive'. For use at JVM init time, when the ! // caller may mmap archived heap data at the specified range(s). ! // Verify that the MemRegions specified in the argument array are within the ! // reserved heap. ! bool check_archive_addresses(MemRegion* range, size_t count); ! ! // Commit the appropriate G1 regions containing the specified MemRegions ! // and mark them as 'archive' regions. The regions in the array must be ! // non-overlapping and in order of ascending address. ! bool alloc_archive_regions(MemRegion* range, size_t count); ! ! // Insert any required filler objects in the G1 regions around the specified ! // ranges to make the regions parseable. This must be called after ! // alloc_archive_regions, and after class loading has occurred. ! void fill_archive_regions(MemRegion* range, size_t count); protected: // Shrink the garbage-first heap by at most the given size (in bytes!). // (Rounds down to a HeapRegion boundary.)
< prev index next >