diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 2 |
1 files changed, 2 insertions, 0 deletions
| @@ -445,6 +445,8 @@ This will do multiple allocations: | |||
| 445 | 445 | ||
| 446 | To facilitate memory handling, consider using an arena allocator like this: | 446 | To facilitate memory handling, consider using an arena allocator like this: |
| 447 | ```zig | 447 | ```zig |
| 448 | const allocator = std.heap.page_allocator; // Use a suitable allocator | ||
| 449 | |||
| 448 | var arena = std.heap.ArenaAllocator.init(allocator); | 450 | var arena = std.heap.ArenaAllocator.init(allocator); |
| 449 | defer arena.deinit(); | 451 | defer arena.deinit(); |
| 450 | 452 | ||