Constructor
new MemoryManager(memory, malloc, free)
Construct a memory manager.
Parameters:
Name | Type | Description |
---|---|---|
memory |
WebAssembly.Memory | The memory fro the WebAssembly instance. |
malloc |
malloc | Allocate memory |
free |
free | Free memory |
- Source:
Classes
Members
dataView
- Source:
Methods
createTypedArray(typedArrayType, lengthOrArray) → {TypedArray}
Create a typed array
Parameters:
Name | Type | Description |
---|---|---|
typedArrayType |
TypedArrayType | The typed array type |
lengthOrArray |
number | Array.<T> | Either an array to be copied or the required length |
- Source:
Returns:
The typed array
- Type
- TypedArray
freeWhenFinalized(target, address)
Free an address when finalized.
Parameters:
Name | Type | Description |
---|---|---|
target |
* | The object that will be finalized |
address |
number | The address to be freed |
- Source: