API reference › @evolu/sqlite-wasm › c-api › sqlite3_realloc
function sqlite3_realloc(
deps: SqliteWasmDep,
): (ptr: 0 | SqliteOwnedPtr, byteLength: number) => 0 | SqliteOwnedPtr;
Defined in: packages/sqlite-wasm/src/CApi.ts:1078
Resizes memory from sqlite3_malloc, keeping its leading bytes, and returns the new address, after which the old one is invalid. A NULL pointer allocates, a size of 0 or less frees and returns NULL, and when out of memory it returns NULL and leaves the old allocation intact.
Wasm type i(ii). Signature ["sqlite3_realloc", "*", "*", "int"] from
SQLite's table.