src/share/vm/gc_implementation/g1/heapRegionSeq.hpp

changeset 2472
0fa27f37d4d4
parent 2469
7e37af9d69ef
child 2643
1216415d8e35
equal deleted inserted replaced
2471:cb913d743d09 2472:0fa27f37d4d4
39 39
40 // The index in "_regions" at which to start the next allocation search. 40 // The index in "_regions" at which to start the next allocation search.
41 // (For efficiency only; private to obj_allocate after initialization.) 41 // (For efficiency only; private to obj_allocate after initialization.)
42 int _alloc_search_start; 42 int _alloc_search_start;
43 43
44 // Attempts to allocate a block of the (assumed humongous) word_size, 44 // Finds a contiguous set of empty regions of length num, starting
45 // starting at the region "ind". 45 // from a given index.
46 HeapWord* alloc_obj_from_region_index(int ind, size_t word_size); 46 int find_contiguous_from(int from, size_t num);
47 47
48 // Currently, we're choosing collection sets in a round-robin fashion, 48 // Currently, we're choosing collection sets in a round-robin fashion,
49 // starting here. 49 // starting here.
50 int _next_rr_candidate; 50 int _next_rr_candidate;
51 51
74 74
75 // Returns the number of contiguous regions at the end of the sequence 75 // Returns the number of contiguous regions at the end of the sequence
76 // that are available for allocation. 76 // that are available for allocation.
77 size_t free_suffix(); 77 size_t free_suffix();
78 78
79 // Requires "word_size" to be humongous (in the technical sense). If 79 // Finds a contiguous set of empty regions of length num.
80 // possible, allocates a contiguous subsequence of the heap regions to 80 int find_contiguous(size_t num);
81 // satisfy the allocation, and returns the address of the beginning of
82 // that sequence, otherwise returns NULL.
83 HeapWord* obj_allocate(size_t word_size);
84 81
85 // Apply the "doHeapRegion" method of "blk" to all regions in "this", 82 // Apply the "doHeapRegion" method of "blk" to all regions in "this",
86 // in address order, terminating the iteration early 83 // in address order, terminating the iteration early
87 // if the "doHeapRegion" method returns "true". 84 // if the "doHeapRegion" method returns "true".
88 void iterate(HeapRegionClosure* blk); 85 void iterate(HeapRegionClosure* blk);

mercurial