allocator

module
v0.0.0-...-235377b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2020 License: Apache-2.0

README

allocator. WIP. This library is under construction.

Build Go Report Card GoDoc

Primitive arena allocator

List build targets

go run ./cmd/internal -h

Verify

go run ./cmd/internal verify

Or

go run ./cmd/internal itself
./make verify

Roadmap

  1. arena map on top of linear hashing alg
  2. instrumented arena
  3. create additional methods for allocation within limits that can accept to sizes (minSize, preferableSize)
  4. close arena function
  5. arena leak detector
  6. to ref pointers leak detector
  7. thread safe arena registry:
    1. with whole registry allocation limit
    2. by type arena pools
    3. metrics

Done:

  1. Raw arena implementation
  2. General arena wrapper with basic metrics
  3. Support fetch current allocation offset
  4. Preallocate arena buffer
  5. Arena options
  6. Wrap arenas into each other
  7. Set allocation limits
  8. Clear whole arena
  9. Byte slice allocation options
    1. Capacity management
    2. Append function
    3. Separate hiding header that can be resolved to []byte
    4. Full slice copy to general heap option
    5. String cast option
    6. Copy to heap with to string cast
    7. Arena string allocation option from passed []byte
    8. Optimization of append to consecutive byte slices where we try to fit allocation in currently available buffer
  10. Code generation - take into account the observability of specified structure
  11. Option to clean a underlying arena during clear in Generic allocator
  12. Make sure that Append works on top of "empty" slices
  13. Tests with '-d=checkptr'
  14. Make arena.Buffer.WriteString throw panic on allocation error to bo compatible with bytes.Buffer
  15. Documentation for the generated code
  16. Add sub-slicing to the generated code and arena.Bytes

Directories

Path Synopsis
cmd
lib

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL