mirror of
https://github.com/oven-sh/bun
synced 2026-02-12 11:59:00 +00:00
Add thread safety checks to MimallocArena (#21806)
Make sure allocations happen on the same thread. (For internal tracking: fixes STAB-919)
This commit is contained in:
@@ -23,7 +23,6 @@ fn mimalloc_free(
|
||||
}
|
||||
|
||||
const MimallocAllocator = struct {
|
||||
pub const supports_posix_memalign = true;
|
||||
fn alignedAlloc(len: usize, alignment: mem.Alignment) ?[*]u8 {
|
||||
if (comptime Environment.enable_logs)
|
||||
log("mi_alloc({d}, {d})", .{ len, alignment.toByteUnits() });
|
||||
@@ -77,8 +76,6 @@ const c_allocator_vtable = &Allocator.VTable{
|
||||
};
|
||||
|
||||
const ZAllocator = struct {
|
||||
pub const supports_posix_memalign = true;
|
||||
|
||||
fn alignedAlloc(len: usize, alignment: mem.Alignment) ?[*]u8 {
|
||||
log("ZAllocator.alignedAlloc: {d}\n", .{len});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user