class MemoryManager
package de.polygonal.ds.mem
Manages fast "alchemy memory"
Variables
Methods
malloc (access:MemoryAccess, numBytes:Int):Void
Copies n bytes from the location pointed by the index source to the location pointed by the index destination.
Copying takes place as if an intermediate buffer was used, allowing the destination and source to overlap.
See:
Static variables
staticAUTO_RECLAIM_INTERVAL:Float
The update rate in seconds for the weak reference monitor that detects GCed MemoryAccess objects.
A smaller value requires more CPU time but releases memory earlier.
The default value is 0.25 seconds.
staticAUTO_RECLAIM_MEMORY:Bool
If true, allocated memory will be automatically freed when the reference to a MemoryAccess object is garbage collected.
staticBLOCK_SIZE_BYTES:Int
The minimum block size for allocating additional memory on the fly.
The default value is 64 KiB. The minimum value is 1024 bytes or 1 KiB.
Changing this value has no effect after memory has been allocated for the first time.
staticMEMORY_LIMIT_BYTES:Int
The total number bytes that the user is allowed to allocate (1 MiB equals 1.048.576 bytes).
This should be used as a safe upper limit for detecting memory leaks during development.
The default value is 64 MiB.
staticRAW_BYTES:Int
A reserved, fixed portion of bytes at the beginning of the byte array which can be used as a temporary buffer or for doing math tricks.
Changing this value has no effect after memory has been allocated for the first time.
staticRESERVE_BYTES:Int
The total number of bytes that are preallocated prior to the first call to malloc().
Default is 0 bytes.