675 // Verify that the MemRegions specified in the argument array are within the 676 // reserved heap. 677 bool check_archive_addresses(MemRegion* range, size_t count); 678 679 // Commit the appropriate G1 regions containing the specified MemRegions 680 // and mark them as 'archive' regions. The regions in the array must be 681 // non-overlapping and in order of ascending address. 682 bool alloc_archive_regions(MemRegion* range, size_t count); 683 684 // Insert any required filler objects in the G1 regions around the specified 685 // ranges to make the regions parseable. This must be called after 686 // alloc_archive_regions, and after class loading has occurred. 687 void fill_archive_regions(MemRegion* range, size_t count); 688 689 // For each of the specified MemRegions, uncommit the containing G1 regions 690 // which had been allocated by alloc_archive_regions. This should be called 691 // rather than fill_archive_regions at JVM init time if the archive file 692 // mapping failed, with the same non-overlapping and sorted MemRegion array. 693 void dealloc_archive_regions(MemRegion* range, size_t count); 694 695 protected: 696 697 // Shrink the garbage-first heap by at most the given size (in bytes!). 698 // (Rounds down to a HeapRegion boundary.) 699 virtual void shrink(size_t expand_bytes); 700 void shrink_helper(size_t expand_bytes); 701 702 #if TASKQUEUE_STATS 703 static void print_taskqueue_stats_hdr(outputStream* const st = gclog_or_tty); 704 void print_taskqueue_stats(outputStream* const st = gclog_or_tty) const; 705 void reset_taskqueue_stats(); 706 #endif // TASKQUEUE_STATS 707 708 // Schedule the VM operation that will do an evacuation pause to 709 // satisfy an allocation request of word_size. *succeeded will 710 // return whether the VM operation was successful (it did do an 711 // evacuation pause) or not (another thread beat us to it or the GC 712 // locker was active). Given that we should not be holding the 713 // Heap_lock when we enter this method, we will pass the 714 // gc_count_before (i.e., total_collections()) as a parameter since | 675 // Verify that the MemRegions specified in the argument array are within the 676 // reserved heap. 677 bool check_archive_addresses(MemRegion* range, size_t count); 678 679 // Commit the appropriate G1 regions containing the specified MemRegions 680 // and mark them as 'archive' regions. The regions in the array must be 681 // non-overlapping and in order of ascending address. 682 bool alloc_archive_regions(MemRegion* range, size_t count); 683 684 // Insert any required filler objects in the G1 regions around the specified 685 // ranges to make the regions parseable. This must be called after 686 // alloc_archive_regions, and after class loading has occurred. 687 void fill_archive_regions(MemRegion* range, size_t count); 688 689 // For each of the specified MemRegions, uncommit the containing G1 regions 690 // which had been allocated by alloc_archive_regions. This should be called 691 // rather than fill_archive_regions at JVM init time if the archive file 692 // mapping failed, with the same non-overlapping and sorted MemRegion array. 693 void dealloc_archive_regions(MemRegion* range, size_t count); 694 695 // Wrapper function of CollectedHeap::fill_with_objects() with setting 696 // _filler_array_max_size = _humongous_object_threshold_in_words. 697 static void fill_with_non_humongous_objects(HeapWord* start, size_t words, bool zap = true); 698 699 protected: 700 701 // Shrink the garbage-first heap by at most the given size (in bytes!). 702 // (Rounds down to a HeapRegion boundary.) 703 virtual void shrink(size_t expand_bytes); 704 void shrink_helper(size_t expand_bytes); 705 706 #if TASKQUEUE_STATS 707 static void print_taskqueue_stats_hdr(outputStream* const st = gclog_or_tty); 708 void print_taskqueue_stats(outputStream* const st = gclog_or_tty) const; 709 void reset_taskqueue_stats(); 710 #endif // TASKQUEUE_STATS 711 712 // Schedule the VM operation that will do an evacuation pause to 713 // satisfy an allocation request of word_size. *succeeded will 714 // return whether the VM operation was successful (it did do an 715 // evacuation pause) or not (another thread beat us to it or the GC 716 // locker was active). Given that we should not be holding the 717 // Heap_lock when we enter this method, we will pass the 718 // gc_count_before (i.e., total_collections()) as a parameter since |