memutils v0.4.13 (2018-10-09T15:51:45Z)
Dub
Repo
ObjectAllocator
memutils
utils
Undocumented in source.
package
template
ObjectAllocator (
T
ALLOC
) {
import
std
.
traits
:
ReturnType
;
;
import
core
.
memory
:
GC
;
;
package
enum
ElemSize
;
package
static if
(
ALLOC.stringof == "PoolStack"
)
ReturnType
!(
ALLOC
.
top
)
function
()
m_getAlloc
;
package
static if
(
__traits(hasMember, T, "NOGC")
)
enum
NOGC
;
package
static if
(!(
__traits(hasMember, T, "NOGC")
))
enum
NOGC
;
alias
TR
=
RefTypeOf
!
T
;
TR
alloc
(ARGS args);
void
free
(TR obj);
}
Members
Aliases
TR
alias
TR
=
RefTypeOf
!
T
Undocumented in source.
Functions
alloc
TR
alloc
(ARGS args)
Undocumented in source. Be warned that the author may not have intended to support it.
free
void
free
(TR obj)
Undocumented in source. Be warned that the author may not have intended to support it.
Manifest constants
ElemSize
enum
ElemSize
;
Undocumented in source.
NOGC
enum
NOGC
;
Undocumented in source.
NOGC
enum
NOGC
;
Undocumented in source.
Variables
m_getAlloc
ReturnType
!(
ALLOC
.
top
)
function
()
m_getAlloc
;
Undocumented in source.
Meta
Source
See Implementation
memutils
utils
functions
allocArray
freeArray
reallocArray
translateAllocator
mixin templates
ConvenienceAllocators
structs
AppMem
Malloc
SecureMem
ThreadMem
templates
ObjectAllocator