Implemented foundation::ScratchAllocator.