diff options
author | 2023-08-07 18:51:16 -0700 | |
---|---|---|
committer | 2023-08-07 18:51:16 -0700 | |
commit | f2f227720b3ffe1797a0a4e500e9a9a639167dc6 (patch) | |
tree | a3fab7a9c55775c8bd637161aa2551a7659a21b8 /src/mimalloc_arena.zig | |
parent | 0b183beb51367004795d8a431eb06bb2fa4f8250 (diff) | |
download | bun-f2f227720b3ffe1797a0a4e500e9a9a639167dc6.tar.gz bun-f2f227720b3ffe1797a0a4e500e9a9a639167dc6.tar.zst bun-f2f227720b3ffe1797a0a4e500e9a9a639167dc6.zip |
WASM test analyzer (#4043)
* wasm
* WASM test scanner
* Update Makefile
* Update Makefile
* Configurable heap limit
* slightly better error
* Update js_parser.zig
* Update path.test.js
* Update node.mjs
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'src/mimalloc_arena.zig')
-rw-r--r-- | src/mimalloc_arena.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mimalloc_arena.zig b/src/mimalloc_arena.zig index dc71a887e..c5975b72d 100644 --- a/src/mimalloc_arena.zig +++ b/src/mimalloc_arena.zig @@ -80,7 +80,7 @@ const ArenaRegistry = struct { var registry = ArenaRegistry{}; pub fn register(arena: Arena) void { - if (comptime Environment.allow_assert) { + if (comptime Environment.allow_assert and Environment.isNative) { registry.mutex.lock(); defer registry.mutex.unlock(); var entry = registry.arenas.getOrPut(arena.heap.?) catch unreachable; @@ -100,7 +100,7 @@ const ArenaRegistry = struct { } pub fn assert(arena: Arena) void { - if (comptime Environment.allow_assert) { + if (comptime Environment.allow_assert and Environment.isNative) { registry.mutex.lock(); defer registry.mutex.unlock(); const expected = registry.arenas.get(arena.heap.?) orelse { @@ -117,7 +117,7 @@ const ArenaRegistry = struct { } pub fn unregister(arena: Arena) void { - if (comptime Environment.allow_assert) { + if (comptime Environment.allow_assert and Environment.isNative) { registry.mutex.lock(); defer registry.mutex.unlock(); if (!registry.arenas.swapRemove(arena.heap.?)) { |