# C.alloc

Allocate a zero-filled managed buffer.

```js
client.alloc(bytes)
```

## Arguments

| Argument | Type | Meaning |
| --- | --- | --- |
| `bytes` | number | Integer 1..16777216; session total limit 64 MiB. |

## Returns

Managed pointer handle with byteLength/readBytes/writeBytes/release.

## Example

```js
const buffer = C.alloc(4);
try {
  buffer.writeBytes([65, 66, 67, 0]);
  console.log(buffer.readBytes());
} finally { buffer.release(); }
```

## Notes

Use release(), not native free/realloc, for managed storage.

[All JavaScript APIs](https://mcp.applesauceos.com/doc/api.md) · [Automation playbook](https://mcp.applesauceos.com/doc/ai.md)
