Skip to content

i-e-b/SArA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SArA

Simple Arena Allocator. Experimenting with a basic region-based allocator/GC

This is to support MECS. The the address space is split into relatively large arenas (64K in this implementation). Each is consumed forward-only with its own 'head' position. Once there are no references to an arena, it is considered cleared, and the head position is reset. This design means simple pointers work fine.

Beyond the MemorySimulator, there should be no heap-memory managed by .Net

Parts:

  • Basic allocator
  • Raw memory simulator
  • Variable array/vector
  • Generic variable vector (to help back hash table etc)
  • Hash table
  • Proper result handling
  • Tree structure (for syntax parsing etc. Probably as list-pairs (leafs and children)
  • Serialisation (would be good to have a generalised dense format, plus a tool to make it human readable)
  • GC scanning & reference listing

Maybe:

  • Tag arenas with owner scope? Multiple arenas per scope, but only one scope per arena? (how would that work with recursion?) -> (could also tag things up per-function, which might make leaking easier to trace?)

Expecting quite high fragmentation. Maybe certain subsets of arenas for smaller objects? Could add defrag later, but that would need smart pointers.

About

Experimenting with an allocator/GC

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages