An allocation is useless if you cannot store data in it. Today you add byte-level read and write to the arena, so a returned offset becomes a real place to keep values - and reads of untouched memory come back zero.
Store and retrieve bytes at any offset in the arena, with untouched bytes reading as zero.
An offset is only useful if you can actually keep data there. The arena is a byte
slice, so reading and writing is just indexing into it: Set(off, b) stores a
byte and Get(off) returns it. Because the backing buffer is created zeroed, any
byte you have not written yet reads back as 0x00 - a property the allocator will
lean on later when it needs to hand out clean, zeroed memory.
This is the last piece that makes the arena a real store: you can allocate a region and then fill it. From the next chapter on, the allocator itself writes small bookkeeping records - block headers - into these same bytes, so the read and write you build today are what the whole block layout is stored in.
func (a *Arena) Set(off int, b byte) { a.buf[off] = b }func (a *Arena) Get(off int) byte { return a.buf[off] }// the backing slice starts zeroed, so unwritten bytes read as 0