mirror of
https://github.com/oven-sh/bun
synced 2026-02-12 03:48:56 +00:00
actually lets downgrade mimalloc
This commit is contained in:
@@ -4,7 +4,7 @@ register_repository(
|
||||
REPOSITORY
|
||||
oven-sh/mimalloc
|
||||
COMMIT
|
||||
7d4ee623861ddd5561503a5205df7cf8e8d0623c
|
||||
7085b6cec31641fddaca3d40932cda82e91baf07
|
||||
)
|
||||
|
||||
set(MIMALLOC_CMAKE_ARGS
|
||||
|
||||
@@ -212,3 +212,6 @@ inline fn mi_malloc_satisfies_alignment(alignment: usize, size: usize) bool {
|
||||
return (alignment == @sizeOf(*anyopaque) or
|
||||
(alignment == MI_MAX_ALIGN_SIZE and size >= (MI_MAX_ALIGN_SIZE / 2)));
|
||||
}
|
||||
|
||||
pub const mi_arena_id_t = ?*anyopaque;
|
||||
pub extern fn mi_heap_new_ex(heap_tag: c_int, allow_destroy: bool, arena_id: mi_arena_id_t) ?*Heap;
|
||||
|
||||
@@ -186,7 +186,7 @@ pub const Arena = struct {
|
||||
}
|
||||
|
||||
pub fn init() !Arena {
|
||||
const arena = Arena{ .heap = mimalloc.mi_heap_new() orelse return error.OutOfMemory };
|
||||
const arena = Arena{ .heap = mimalloc.mi_heap_new_ex(0, true, null) orelse return error.OutOfMemory };
|
||||
// if (comptime Environment.isDebug) {
|
||||
// ArenaRegistry.register(arena);
|
||||
// }
|
||||
|
||||
@@ -261,3 +261,5 @@ extern "C" bool icu_hasBinaryProperty(UChar32 cp, unsigned int prop)
|
||||
{
|
||||
return u_hasBinaryProperty(cp, static_cast<UProperty>(prop));
|
||||
}
|
||||
|
||||
extern "C" __attribute__((weak)) void mi_thread_set_in_threadpool() {}
|
||||
|
||||
Reference in New Issue
Block a user