File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -124,7 +124,8 @@ if(USE_MIMALLOC)
124124 FetchContent_Declare (
125125 mimalloc
126126 GIT_REPOSITORY https://github.com/microsoft/mimalloc
127- GIT_TAG v2.2.3
127+ GIT_BRANCH dev3
128+ GIT_TAG v3.4.1
128129 # Unnecessarily deep directory structure, but it saves us from a complicated
129130 # stage0 update for now. If we ever update the other dependencies like
130131 # cadical, it might be worth reorganizing the directory structure.
Original file line number Diff line number Diff line change @@ -409,8 +409,9 @@ static inline lean_object * lean_alloc_small_object(unsigned sz) {
409409 lean_inc_heartbeat ();
410410#ifdef LEAN_MIMALLOC
411411 // HACK: emulate behavior of small allocator to avoid `leangz` breakage for now
412+ // NOTE: `sz` is known at compile time for most callers
412413 sz = lean_align (sz, LEAN_OBJECT_SIZE_DELTA );
413- void * mem = mi_malloc_small (sz);
414+ void * mem = sz <= MI_SMALL_SIZE_MAX ? mi_malloc_small (sz) : mi_malloc (sz);
414415 if (mem == 0 ) lean_internal_panic_out_of_memory ();
415416 lean_object * o = (lean_object*)mem;
416417 o->m_cs_sz = sz;
You can’t perform that action at this time.
0 commit comments