Save 7G mem on mainnet fixing AccIndex overalloc. (#14435) (#14451)

(cherry picked from commit c9df6134fa)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
This commit is contained in:
mergify[bot]
2021-01-06 03:43:04 +00:00
committed by GitHub
parent d44d8e929b
commit d916a16115

View File

@ -502,7 +502,7 @@ impl<T: 'static + Clone> AccountsIndex<T> {
if w_account_entry.is_none() {
let new_entry = Arc::new(AccountMapEntryInner {
ref_count: AtomicU64::new(0),
slot_list: RwLock::new(SlotList::with_capacity(32)),
slot_list: RwLock::new(SlotList::with_capacity(1)),
});
let mut w_account_maps = self.account_maps.write().unwrap();
let account_entry = w_account_maps.entry(*pubkey).or_insert_with(|| {