3 template <typename Block> struct bump_allocator {
4 /* offset of 'here' and 'end' is hardcoded in compiler backends */
10 bump_allocator(cell size, cell start)
11 : here(start), start(start), end(start + size), size(size) {}
13 bool contains_p(Block* block) { return ((cell)block - start) < size; }
15 Block* allot(cell size) {
17 here = h + align(size, data_alignment);
21 cell occupied_space() { return here - start; }
23 cell free_space() { return end - here; }
25 cell next_object_after(cell scan) {
26 cell size = ((Block*)scan)->size();
27 if (scan + size < here)