From 2a75e5048cb6d9b8bbf0029e4502f4393e2d794c Mon Sep 17 00:00:00 2001 From: Dragoljub Duric Date: Thu, 26 Oct 2023 11:33:49 +0000 Subject: [PATCH] . --- src/memory_manager.rs | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/memory_manager.rs b/src/memory_manager.rs index 51fe9472..a7ef71dc 100644 --- a/src/memory_manager.rs +++ b/src/memory_manager.rs @@ -441,7 +441,7 @@ impl MemoryManagerInner { .or_insert(vec_buckets); } - let mem_mgr = if last_occupied_bucket == -1 { + if last_occupied_bucket == -1 { Self { memory, allocated_buckets: header.num_allocated_buckets, @@ -469,19 +469,7 @@ impl MemoryManagerInner { memory_buckets, freed_buckets, } - }; - - // Update the header. - mem_mgr.save_header(); - - // Rewrite the stable store to be layout V2. - write( - &mem_mgr.memory, - bucket_indexes_offset().get(), - mem_mgr.get_bucket_ids_in_bytes().as_ref(), - ); - - mem_mgr + } } fn load(memory: M) -> Self {