void sample() { // If there was a failed allocation make allocation rate equal // to the size of the whole chunk. This ensures the progress of // the adaptation process.
size_t alloc_rate_sample; if (_allocation_failed) {
alloc_rate_sample = space()->capacity_in_bytes();
_allocation_failed = false;
} else {
alloc_rate_sample = space()->used_in_bytes();
}
alloc_rate()->sample(alloc_rate_sample);
}
// Check if the NUMA topology has changed. Add and remove spaces if needed. // The update can be forced by setting the force parameter equal to true. bool update_layout(bool force); // Bias region towards the lgrp. void bias_region(MemRegion mr, int lgrp_id); // Free pages in a given region. void free_region(MemRegion mr); // Get current chunk size.
size_t current_chunk_size(int i); // Get default chunk size (equally divide the space).
size_t default_chunk_size(); // Adapt the chunk size to follow the allocation rate.
size_t adaptive_chunk_size(int i, size_t limit); // Scan and free invalid pages. void scan_pages(size_t page_count); // Return the bottom_region and the top_region. Align them to page_size() boundary. // |------------------new_region---------------------------------| // |----bottom_region--|---intersection---|------top_region------| void select_tails(MemRegion new_region, MemRegion intersection,
MemRegion* bottom_region, MemRegion *top_region); // Try to merge the invalid region with the bottom or top region by decreasing // the intersection area. Return the invalid_region aligned to the page_size() // boundary if it's inside the intersection. Return non-empty invalid_region // if it lies inside the intersection (also page-aligned). // |------------------new_region---------------------------------| // |----------------|-------invalid---|--------------------------| // |----bottom_region--|---intersection---|------top_region------| void merge_regions(MemRegion new_region, MemRegion* intersection,
MemRegion *invalid_region);
public:
GrowableArray<LGRPSpace*>* lgrp_spaces() const { return _lgrp_spaces; }
MutableNUMASpace(size_t alignment); virtual ~MutableNUMASpace(); // Space initialization. virtualvoid initialize(MemRegion mr, bool clear_space, bool mangle_space, bool setup_pages = SetupPages,
WorkerThreads* pretouch_workers = NULL); // Update space layout if necessary. Do all adaptive resizing job. virtualvoid update(); // Update allocation rate averages. virtualvoid accumulate_statistics();
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.