-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When allocating maps for Utxo caches, you may want to purposely allocate a size thats lower than the one that'd fit in the memory limit. Ex: user gives a utxomaxcachesize of 1000MiB. You can allocate ~800MiB but you may want to allocate ~400MiB to leave room for UtxoEntry sizes. Having a function that returns the minimum amount of entries to allocate ~800MiB gives the caller the option to do -1 and allocate half as much memory for the map.
- Loading branch information
1 parent
f42ff51
commit c2bf96c
Showing
2 changed files
with
46 additions
and
0 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