1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Change this ONE line to swap allocator globally for all users of the macro.
// going with LLffHeap for now, since smaller code size
// we expect simpler modules at this point and are not too concerned about fragmentation
pub type __DefaultHeap = LlffHeap;
/// Emits the cell's global allocator: an `embedded-alloc` heap of `$heap_size`
/// bytes, the `init_allocator` export the host calls before running the module,
/// and a no-op `critical-section` backend (Wasm cells are single-threaded).
///
/// Invoked for you by [`cell_prelude!`](crate::cell_prelude), which also sizes
/// the heap; call it directly only when opting out of the prelude.