MiniQuake

src/miniquake/zone.ml

Package
miniquake.zone
Reachable
Yes

Declarations

align8

function align8(value)

Implements the `align8` operation for `miniquake.zone` (align8).

ParameterTypeDefaultDescription
valuedynamic—Value consumed by `align8`.

View source

BLOCK_HEADER_SIZE

const BLOCK_HEADER_SIZE = 24

Defines the block header size value used by `miniquake.zone`.

View source

check

function check(state)

Implements the `check` operation for `miniquake.zone` (check).

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.zone` state used by `check`.

View source

clear

function clear(state, size)

Implements the `clear` operation for `miniquake.zone` (clear).

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.zone` state used by `clear`.
sizedynamic—Size of the requested data or resource.

View source

create

function create(size)

Implements the `create` operation for `miniquake.zone` (create).

ParameterTypeDefaultDescription
sizedynamic—Size of the requested data or resource.

View source

dumpHeap

function dumpHeap(state)

Implements the `dumpHeap` operation for `miniquake.zone` (dump heap).

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.zone` state used by `dumpHeap`.

View source

DYNAMIC_SIZE

const DYNAMIC_SIZE = 49152

Defines the dynamic size value used by `miniquake.zone`.

View source

free

function free(block)

Implements the `free` operation for `miniquake.zone` (free).

ParameterTypeDefaultDescription
blockdynamic—The block input consumed by `free`.

View source

freeMemory

function freeMemory(state)

Release state for free memory.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.zone` state used by `freeMemory`.

View source

indexOf

function indexOf(state, block)

Return index of for the active module state.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.zone` state used by `indexOf`.
blockdynamic—The block input consumed by `indexOf`.

View source

insertAfter

function insertAfter(state, index, block)

Add state for insert after.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.zone` state used by `insertAfter`.
indexdynamic—Zero-based index of the requested entry.
blockdynamic—The block input consumed by `insertAfter`.

View source

malloc

function malloc(state, size)

Implements the `malloc` operation for `miniquake.zone` (malloc).

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.zone` state used by `malloc`.
sizedynamic—Size of the requested data or resource.

View source

MINFRAGMENT

const MINFRAGMENT = 64

Defines the minfragment value used by `miniquake.zone`.

View source

printHeap

function printHeap(state)

Format and emit heap.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.zone` state used by `printHeap`.

View source

removeAt

function removeAt(state, index)

Release state for remove at.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.zone` state used by `removeAt`.
indexdynamic—Zero-based index of the requested entry.

View source

tagMalloc

function tagMalloc(state, size, tag)

Implements the `tagMalloc` operation for `miniquake.zone` (tag malloc).

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.zone` state used by `tagMalloc`.
sizedynamic—Size of the requested data or resource.
tagdynamic—The tag input consumed by `tagMalloc`.

View source

TRASH_SIZE

const TRASH_SIZE = 4

Defines the trash size value used by `miniquake.zone`.

View source

Z_CheckHeap

function Z_CheckHeap(state)

Mirror Quake's Z_CheckHeap routine and its observable state changes.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.zone` state used by `Z_CheckHeap`.

View source

Z_ClearZone

function Z_ClearZone(state, size)

Explicit zone.c/header entry points. The zone state parameter replaces the original process-global mainzone pointer.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.zone` state used by `Z_ClearZone`.
sizedynamic—Size of the requested data or resource.

View source

Z_DumpHeap

function Z_DumpHeap(state)

Mirror Quake's Z_DumpHeap routine and its observable state changes.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.zone` state used by `Z_DumpHeap`.

View source

Z_Free

function Z_Free(block)

Mirror Quake's Z_Free routine and its observable state changes.

ParameterTypeDefaultDescription
blockdynamic—The block input consumed by `Z_Free`.

View source

Z_FreeMemory

function Z_FreeMemory(state)

Mirror Quake's Z_FreeMemory routine and its observable state changes.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.zone` state used by `Z_FreeMemory`.

View source

Z_Malloc

function Z_Malloc(state, size)

Mirror Quake's Z_Malloc routine and its observable state changes.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.zone` state used by `Z_Malloc`.
sizedynamic—Size of the requested data or resource.

View source

Z_Print

function Z_Print(state)

Mirror Quake's Z_Print routine and its observable state changes.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.zone` state used by `Z_Print`.

View source

Z_TagMalloc

function Z_TagMalloc(state, size, tag)

Mirror Quake's Z_TagMalloc routine and its observable state changes.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.zone` state used by `Z_TagMalloc`.
sizedynamic—Size of the requested data or resource.
tagdynamic—The tag input consumed by `Z_TagMalloc`.

View source

ZONE_ADMIN_SIZE

const ZONE_ADMIN_SIZE = 32

Defines the zone admin size value used by `miniquake.zone`.

View source

miniquake.zone.ZoneBlock struct

ZONEID

const ZONEID = 1919505

Defines the zoneid value used by `miniquake.zone`.

View source

miniquake.zone.ZoneState struct