Skip to content

Module: memory::index

Jovan Gerodetti edited this page Apr 14, 2021 · 4 revisions

allocate(typeOrLength, [prototype={}]) => {*}

exported: allocate
kind: function
declaration: const

Allocates objects and arrays in memory. The allocated structures are excluded from garbage collection.

Name Type Description
typeOrLength string|number either the length of an array, or a string identifying an object type.
[prototype={}] object the structures prototype

release(object) => {undefined}

exported: release
kind: function
declaration: const

Marks he given structure as unused and therefore available for usage. If a new array or object is to be allocated the released items will be reused, before an actual new object is created.

Name Type Description
object * data to be released

flushHeap() => {undefined}

exported: flushHeap
kind: function
declaration: const

Makes all released object available for garbage collection.

Clone this wiki locally