Primitive arena allocator
List build targets
go run make -h
Verify
go run make verify
Or you can prebuild make tool and use it like that
go run make itself
./make verify
Roadmap
- arena map on top of linear hashing alg
- instrumented arena
- create additional methods for allocation within limits that can accept to sizes (minSize, preferableSize)
- close arena function
- arena leak detector
- to ref pointers leak detector
- thread safe arena registry:
- with whole registry allocation limit
- by type arena pools
- metrics
Done:
- Raw arena implementation
- General arena wrapper with basic metrics
- Support fetch current allocation offset
- Preallocate arena buffer
- Arena options
- Wrap arenas into each other
- Set allocation limits
- Clear whole arena
- Byte slice allocation options
- Capacity management
- Append function
- Separate hiding header that can be resolved to []byte
- Full slice copy to general heap option
- String cast option
- Copy to heap with to string cast
- Arena string allocation option from passed []byte
- Optimization of append to consecutive byte slices where we try to fit allocation in currently available buffer
- Code generation - take into account the observability of specified structure
- Option to clean a underlying arena during clear in Generic allocator
- Make sure that Append works on top of "empty" slices
- Tests with '-d=checkptr'
- Make arena.Buffer.WriteString throw panic on allocation error to bo compatible with bytes.Buffer
- Documentation for the generated code
- Add sub-slicing to the generated code and arena.Bytes
- Get rid of reflect in library code by replacing reflect.SliceHeader with private type