aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2020-06-05 10:16:41 +0200
committerAndrew Kelley <andrew@ziglang.org>2020-06-09 00:22:34 -0400
commit42c95a64d67ec6fc2839fad36ef50bacc7545258 (patch)
treec857775bf067e7838764125d68210376491058c5 /doc
parent660eef9a43dab695c4aa26330067ce72d375a1be (diff)
downloadzig-42c95a64d67ec6fc2839fad36ef50bacc7545258.tar.gz
zig-42c95a64d67ec6fc2839fad36ef50bacc7545258.zip
Update langref.html.in
Diffstat (limited to 'doc')
-rw-r--r--doc/langref.html.in7
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/langref.html.in b/doc/langref.html.in
index 6b14daad6e..e5c814d663 100644
--- a/doc/langref.html.in
+++ b/doc/langref.html.in
@@ -7652,7 +7652,7 @@ mem.set(u8, dest, c);{#endsyntax#}</pre>
<p>
This function is a low level intrinsic with no safety mechanisms usually useful for allocator
designers targeting Wasm. So unless you are writing a new allocator from scratch, you should use
- something like {#syntax#}@import("std").heap.WasmAllocator{#endsyntax#}.
+ something like {#syntax#}@import("std").heap.WasmPageAllocator{#endsyntax#}.
</p>
{#see_also|@wasmMemoryGrow#}
{#header_close#}
@@ -7668,13 +7668,16 @@ mem.set(u8, dest, c);{#endsyntax#}</pre>
<p>
This function is a low level intrinsic with no safety mechanisms usually useful for allocator
designers targeting Wasm. So unless you are writing a new allocator from scratch, you should use
- something like {#syntax#}@import("std").heap.WasmAllocator{#endsyntax#}.
+ something like {#syntax#}@import("std").heap.WasmPageAllocator{#endsyntax#}.
</p>
{#code_begin|test#}
const std = @import("std");
+const builtin = @import("builtin");
const assert = std.debug.assert;
test "@wasmMemoryGrow" {
+ if (builtin.arch != .wasm32) return error.SkipZigTest;
+
var prev = @wasmMemorySize(0);
assert(prev == @wasmMemoryGrow(0, 1));
assert(prev + 1 == @wasmMemorySize(0));