hyperdb-wasm 0.0.26774-dev.wasm.g364818c4 → 0.0.26775-dev.wasm.g7f2c129a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -229,8 +229,10 @@
229
229
  function allocate(module, bytes) {
230
230
  const pointer = safePointer(module._malloc(bytes.byteLength || 1), "allocation pointer");
231
231
  if (pointer === 0) throw new Error("wasm allocation failed");
232
- if (pointer + bytes.byteLength > module.HEAPU8.byteLength) throw new Error("allocation exceeds the wasm heap");
233
- module.HEAPU8.set(bytes, pointer);
232
+ module.getValue(pointer, "i8");
233
+ const heap = module.HEAPU8;
234
+ if (pointer + bytes.byteLength > heap.byteLength) throw new Error("allocation exceeds the wasm heap");
235
+ heap.set(bytes, pointer);
234
236
  return pointer;
235
237
  }
236
238
  function installHttpRuntime(module, transport) {
@@ -236,8 +236,10 @@ function safePointer(value, name) {
236
236
  function allocate(module2, bytes) {
237
237
  const pointer = safePointer(module2._malloc(bytes.byteLength || 1), "allocation pointer");
238
238
  if (pointer === 0) throw new Error("wasm allocation failed");
239
- if (pointer + bytes.byteLength > module2.HEAPU8.byteLength) throw new Error("allocation exceeds the wasm heap");
240
- module2.HEAPU8.set(bytes, pointer);
239
+ module2.getValue(pointer, "i8");
240
+ const heap = module2.HEAPU8;
241
+ if (pointer + bytes.byteLength > heap.byteLength) throw new Error("allocation exceeds the wasm heap");
242
+ heap.set(bytes, pointer);
241
243
  return pointer;
242
244
  }
243
245
  function installHttpRuntime(module2, transport2) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hyperdb-wasm",
3
- "version": "0.0.26774-dev.wasm.g364818c4",
3
+ "version": "0.0.26775-dev.wasm.g7f2c129a",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=24"