forked from facebookincubator/velox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use uintptr_t instead of uint64_t to represent address (facebookincub…
…ator#8778) Summary: In the current `MmapArena`, `uint64_t` is used to represent an "address", which is a bit obscure. Especially when used in map, it is difficult to distinguish whether it represents a "length" or an "address" (pointer). To improve readability, `uintptr_t` is used instead of `uint64_t` when representing an "address" (pointer). ``` std::map<uint64_t, uint64_t> freeList_; std::map<uint64_t, std::unordered_set<uint64_t>> freeLookup_; ``` V.S. ``` std::map<uintptr_t, uint64_t> freeList_; std::map<uint64_t, std::unordered_set<uintptr_t>> freeLookup_; ``` Pull Request resolved: facebookincubator#8778 Reviewed By: Yuhta, pedroerp Differential Revision: D54685231 Pulled By: mbasmanova fbshipit-source-id: e10b62e851b0d48dfca8b37b3a33674b2282703d
- Loading branch information
1 parent
f3e1bec
commit 30ca1fb
Showing
2 changed files
with
51 additions
and
47 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