-
-
Notifications
You must be signed in to change notification settings - Fork 15.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce PoolChunk's metadata size: change LongPriorityQueue to IntPrio…
…rityQueue (#13504) Motivation: `LongPriorityQueue[]` is used by `PoolChunk` to store available run information of all page classes. This information (i.e., `handle`) contains page offset, page count, isUsed, isSubpage, and bitmapIdx of subpage. * Handle is inserted to `LongPriorityQueue` and `LongLongHashMap` when some memory is freed back to the chunk. * Handle is removed from `LongPriorityQueue` and `LongLongHashMap` when some memory is allocated. * One Handle can be split to two handles, and two continuous handles can be collapsed to one handle. All the `LongPriorityQueue` operations are only related to page offset and page count. The low 32bit `bitmapIdx` is not used at all. So the high 32bit of handle is enough. Modification: 1) Change `LongPriorityQueue` to `IntPriorityQueue` 2) Store high 32bit handle in `IntPriorityQueue` Result: PoolChunk's metadata is smaller. --------- Co-authored-by: xuesenliang <xuesenliang@tencent.com>
- Loading branch information
Showing
3 changed files
with
46 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters