83 intptr_t cur_top = (intptr_t)s->top(); |
83 intptr_t cur_top = (intptr_t)s->top(); |
84 size_t words_left_to_fill = pointer_delta(s->end(), s->top());; |
84 size_t words_left_to_fill = pointer_delta(s->end(), s->top());; |
85 while (words_left_to_fill > 0) { |
85 while (words_left_to_fill > 0) { |
86 size_t words_to_fill = MIN2(words_left_to_fill, CollectedHeap::filler_array_max_size()); |
86 size_t words_to_fill = MIN2(words_left_to_fill, CollectedHeap::filler_array_max_size()); |
87 assert(words_to_fill >= CollectedHeap::min_fill_size(), |
87 assert(words_to_fill >= CollectedHeap::min_fill_size(), |
88 err_msg("Remaining size (" SIZE_FORMAT ") is too small to fill (based on " SIZE_FORMAT " and " SIZE_FORMAT ")", |
88 "Remaining size (" SIZE_FORMAT ") is too small to fill (based on " SIZE_FORMAT " and " SIZE_FORMAT ")", |
89 words_to_fill, words_left_to_fill, CollectedHeap::filler_array_max_size())); |
89 words_to_fill, words_left_to_fill, CollectedHeap::filler_array_max_size()); |
90 CollectedHeap::fill_with_object((HeapWord*)cur_top, words_to_fill); |
90 CollectedHeap::fill_with_object((HeapWord*)cur_top, words_to_fill); |
91 if (!os::numa_has_static_binding()) { |
91 if (!os::numa_has_static_binding()) { |
92 size_t touched_words = words_to_fill; |
92 size_t touched_words = words_to_fill; |
93 #ifndef ASSERT |
93 #ifndef ASSERT |
94 if (!ZapUnusedHeapArea) { |
94 if (!ZapUnusedHeapArea) { |
969 char *e = os::scan_pages(s, (char*)scan_end, &page_expected, &page_found); |
969 char *e = os::scan_pages(s, (char*)scan_end, &page_expected, &page_found); |
970 if (e == NULL) { |
970 if (e == NULL) { |
971 break; |
971 break; |
972 } |
972 } |
973 if (e != scan_end) { |
973 if (e != scan_end) { |
974 assert(e < scan_end, err_msg("e: " PTR_FORMAT " scan_end: " PTR_FORMAT, p2i(e), p2i(scan_end))); |
974 assert(e < scan_end, "e: " PTR_FORMAT " scan_end: " PTR_FORMAT, p2i(e), p2i(scan_end)); |
975 |
975 |
976 if ((page_expected.size != page_size || page_expected.lgrp_id != lgrp_id()) |
976 if ((page_expected.size != page_size || page_expected.lgrp_id != lgrp_id()) |
977 && page_expected.size != 0) { |
977 && page_expected.size != 0) { |
978 os::free_memory(s, pointer_delta(e, s, sizeof(char)), page_size); |
978 os::free_memory(s, pointer_delta(e, s, sizeof(char)), page_size); |
979 } |
979 } |