Skip to content

Lperlind/odin_offset_allocator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Odin Offset Allocator

A straight port of https://github.com/sebbbi/OffsetAllocator/tree/main in odin

usage

// create allocator
allocator, alloc_err := offset_allocator_make(max_size, max_allocs, context.allocator)

// allocate 32 bytes and get the offset
allocation, ok := offset_allocator_allocate(&allocator, 32)
my_offset := allocation.offset
handle := allocation.meta_data

// release the allocation
offset_allocator_free(&allocator, handle)

// delete the allocator itself
offset_allocator_delete(&allocator)

About

Offset Allocator in Odin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages