# alloc
function alloc(maxSize)Create and initialize the requested value.
| Parameter | Type | Default | Description |
|---|---|---|---|
maxSize | dynamic | — | Size of the requested data or resource. |
src/miniquake/sizebuf.mlminiquake/byteio.ml as bio → src/miniquake/byteio.mlminiquake/memory.ml as memory → src/miniquake/memory.mlminiquake/protocol_text.ml as protocolText → src/miniquake/protocol_text.mlminiquake/types.ml as t → src/miniquake/types.mlfunction alloc(maxSize)Create and initialize the requested value.
| Parameter | Type | Default | Description |
|---|---|---|---|
maxSize | dynamic | — | Size of the requested data or resource. |
function allocHunk(startSize)Create and initialize hunk.
| Parameter | Type | Default | Description |
|---|---|---|---|
startSize | dynamic | — | Size of the requested data or resource. |
function allocHunkManaged(memoryState, startSize)Create and initialize hunk managed.
| Parameter | Type | Default | Description |
|---|---|---|---|
memoryState | dynamic | — | Mutable state used by `allocHunkManaged`. |
startSize | dynamic | — | Size of the requested data or resource. |
function allocOverflowing(maxSize)Create and initialize overflowing.
| Parameter | Type | Default | Description |
|---|---|---|---|
maxSize | dynamic | — | Size of the requested data or resource. |
function clear(buffer)Implements the `clear` operation for `miniquake.sizebuf` (clear).
| Parameter | Type | Default | Description |
|---|---|---|---|
buffer | dynamic | — | The buffer input consumed by `clear`. |
function dataSlice(buffer)Implements the `dataSlice` operation for `miniquake.sizebuf` (data slice).
| Parameter | Type | Default | Description |
|---|---|---|---|
buffer | dynamic | — | The buffer input consumed by `dataSlice`. |
function free(buffer)Implements the `free` operation for `miniquake.sizebuf` (free).
| Parameter | Type | Default | Description |
|---|---|---|---|
buffer | dynamic | — | The buffer input consumed by `free`. |
function getSpace(buffer, count)Return space.
| Parameter | Type | Default | Description |
|---|---|---|---|
buffer | dynamic | — | The buffer input consumed by `getSpace`. |
count | dynamic | — | Number of entries or units to process. |
function printText(buffer, text)Format and emit text.
| Parameter | Type | Default | Description |
|---|---|---|---|
buffer | dynamic | — | The buffer input consumed by `printText`. |
text | dynamic | — | Text to parse or process. |
function SZ_Alloc(startSize)Direct pendants for the size-buffer section of WinQuake/common.c.
| Parameter | Type | Default | Description |
|---|---|---|---|
startSize | dynamic | — | Size of the requested data or resource. |
function SZ_Clear(buffer)Mirror Quake's SZ_Clear routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
buffer | dynamic | — | The buffer input consumed by `SZ_Clear`. |
function SZ_Free(buffer)Mirror Quake's SZ_Free routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
buffer | dynamic | — | The buffer input consumed by `SZ_Free`. |
function SZ_GetSpace(buffer, count)Mirror Quake's SZ_GetSpace routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
buffer | dynamic | — | The buffer input consumed by `SZ_GetSpace`. |
count | dynamic | — | Number of entries or units to process. |
function SZ_Print(buffer, text)Mirror Quake's SZ_Print routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
buffer | dynamic | — | The buffer input consumed by `SZ_Print`. |
text | dynamic | — | Text to parse or process. |
function SZ_Write(buffer, source, sourceOffset, count)Mirror Quake's SZ_Write routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
buffer | dynamic | — | The buffer input consumed by `SZ_Write`. |
source | dynamic | — | Source value or collection to read. |
sourceOffset | dynamic | — | Zero-based offset of the requested data. |
count | dynamic | — | Number of entries or units to process. |
function write(buffer, source, sourceOffset, count)Implements the `write` operation for `miniquake.sizebuf` (write).
| Parameter | Type | Default | Description |
|---|---|---|---|
buffer | dynamic | — | The buffer input consumed by `write`. |
source | dynamic | — | Source value or collection to read. |
sourceOffset | dynamic | — | Zero-based offset of the requested data. |
count | dynamic | — | Number of entries or units to process. |
function writeBytes(buffer, source)Writes bytes for `miniquake.sizebuf`.
| Parameter | Type | Default | Description |
|---|---|---|---|
buffer | dynamic | — | The buffer input consumed by `writeBytes`. |
source | dynamic | — | Source value or collection to read. |
function writeEncodedCStringAt(buffer, encoded, count, offset)Encode and write encoded cstring at.
| Parameter | Type | Default | Description |
|---|---|---|---|
buffer | dynamic | — | The buffer input consumed by `writeEncodedCStringAt`. |
encoded | dynamic | — | The encoded input consumed by `writeEncodedCStringAt`. |
count | dynamic | — | Number of entries or units to process. |
offset | dynamic | — | Zero-based offset of the requested data. |