[PartitionAlloc] AllocNewSlotSpan makes 1 slot span (the size is get_bytes_per_span()) accessible.
AllocNewSlotSpan allocates kSuperPageSize memory if there is no available pages, but returns only 1 slot span. So AllocNewSlotSpan should make 1 slot span accessible. (the slot span size is provided by get_bytes_per_span()). This patch also fixes total_size_of_committed_pages. For normal buckets, total_size_of_committed_pages are updated in the following way: - PartitionBucket::AllocNewSlotSpan increases by get_pages_per_slot_span()*PartitionPageSize(). - PartitionBucket::SlowPathAlloc increases by get_bytes_per_span() when recommitting pages. - PartitionPage::Decommit decreases by get_bytes_per_span(). get_bytes_per_span() is not always equal to get_pages_per_slot_span()*PartitionPageSize(), because get_pages_per_slot_span() is a natural number of PartitionPages (calculated by get_system_pages_per_slot_span()). E.g. num_system_pages_per_span is 3 (0 < num_system_pages_per_span < MaxSystemPagesPerSlotSpan()). Change-Id: Ie46c9099086bd88afa6ee9f654cd98f21935d493 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2444671 Commit-Queue: Takashi Sakamoto <tasak@google.com> Reviewed-by:Kentaro Hara <haraken@chromium.org> Cr-Commit-Position: refs/heads/master@{#814119}
Showing
Please register or sign in to comment