lights FAQ Forum github.com/luapower/terra.arrayfreelist
This package
terra.arrayfreelist

Terra Standard Libraries
terra.low
terra.arrayview
terra.dynarray
terra.hashmap
terra.phf
terra.linkedlist
terra.fixedfreelist
terra.arrayfreelist
terra.lrucache
terra.bitarray
terra.utf8
terra.random

terra.arrayfreelist

Freelist for Terra based on a dynamic array


--[[

	Freelist for Terra based on a dynamic array.
	Written by Cosmin Apreutesei. Public Domain.

	Element pointers are not stable between allocations, but their indices are,
	which is why alloc() also return the element id (i.e. index).

	local fl = arrayfreelist(T, [size_t], [context_t])

	fl:init()
	fl:free()

	fl:alloc() -> e, id
	fl:new(...) -> e, id
	fl:release()

	fl.livecount -> n

]]

See the source code for more info.


Package:terra.arrayfreelist
Pkg type:Terra
Version: 803d5ed
Last commit:
Author: Cosmin Apreutesei
License: Public Domain
Requires: +terra.low  +glue  +luajit  +pp 
Required by: none

Top