Browse Source

Fixed occasional failing of 'partial_realloc'. This is because our bookkeeper's vec gets too cramped and should (theoretically) need resizing

Tom Almeida 6 năm trước cách đây
mục cha
commit
647a67f9fb
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      src/allocator.rs

+ 2 - 2
src/allocator.rs

@@ -131,7 +131,7 @@ impl GlobalAllocator {
 
         // The initial acquired segment.
         let (aligner, initial_segment, excessive) = brk::lock().canonical_brk(
-            4 * bookkeeper::EXTRA_ELEMENTS * mem::size_of::<Block>(),
+            8 * bookkeeper::EXTRA_ELEMENTS * mem::size_of::<Block>(),
             mem::align_of::<Block>(),
         );
 
@@ -262,7 +262,7 @@ impl LocalAllocator {
 
         // The initial acquired segment.
         let initial_segment = GLOBAL_ALLOCATOR.lock().get().alloc(
-            4 * bookkeeper::EXTRA_ELEMENTS * mem::size_of::<Block>(),
+            8 * bookkeeper::EXTRA_ELEMENTS * mem::size_of::<Block>(),
             mem::align_of::<Block>(),
         );