| ... | ... | @@ -3,8 +3,10 @@ const assert = std.debug.assert; |
| 3 | 3 | const mem = std.mem; |
| 4 | 4 | const Allocator = std.mem.Allocator; |
| 5 | 5 | |
| 6 | | /// This allocator takes an existing allocator, wraps it, and provides an interface |
| 7 | | /// where you can allocate without freeing, and then free it all together. |
| 6 | /// This allocator takes an existing allocator, wraps it, and provides an interface where |
| 7 | /// you can allocate and then free it all together. Calls to free an individual item only |
| 8 | /// free the item if it was the most recent allocation, otherwise calls to free do |
| 9 | /// nothing. |
| 8 | 10 | pub const ArenaAllocator = struct { |
| 9 | 11 | child_allocator: Allocator, |
| 10 | 12 | state: State, |