8073632: Make auxiliary data structures know their own translation factor

Auxiliary data structures should have knowledge of their own requirements for virtual memory reservations instead of getting these values directly from various places.

Reviewed-by: stefank, kbarrett
This commit is contained in:
Thomas Schatzl 2015-04-27 10:04:26 +02:00
parent 689d9a58b1
commit e08169c253
6 changed files with 42 additions and 8 deletions

View file

@ -139,6 +139,11 @@ class CMBitMap : public CMBitMapRO {
static size_t compute_size(size_t heap_size);
// Returns the amount of bytes on the heap between two marks in the bitmap.
static size_t mark_distance();
// Returns how many bytes (or bits) of the heap a single byte (or bit) of the
// mark bitmap corresponds to. This is the same as the mark distance above.
static size_t heap_map_factor() {
return mark_distance();
}
CMBitMap() : CMBitMapRO(LogMinObjAlignment), _listener() { _listener.set_bitmap(this); }