From 9e65a144fa85eeadfacfdfc9a543116cdb95fdb5 Mon Sep 17 00:00:00 2001 From: Shritesh Bhattarai Date: Wed, 22 May 2019 07:43:12 -0700 Subject: [PATCH] docs: clarify why wasm_allocator should be used --- doc/langref.html.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/langref.html.in b/doc/langref.html.in index 3808ea706a..ec1a93433b 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -8435,7 +8435,7 @@ fn concat(allocator: *Allocator, a: []const u8, b: []const u8) ![]u8 {
  • Are you linking libc? In this case, {#syntax#}std.heap.c_allocator{#endsyntax#} is likely the right choice, at least for your main allocator.
  • Are you building for WebAssembly? In this case, {#syntax#}std.heap.wasm_allocator{#endsyntax#} is likely - the only possible choice for your main allocator.
  • + the right choice for your main allocator as it uses WebAssembly's memory instructions.
  • Is the maximum number of bytes that you will need bounded by a number known at {#link|comptime#}? In this case, use {#syntax#}std.heap.FixedBufferAllocator{#endsyntax#} or