@ai-ecoverse/slicc-kernel 1.147.0 → 1.147.1

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.
package/dist/node.js CHANGED
@@ -3305,7 +3305,7 @@ function satisfies(version, range2) {
3305
3305
  }
3306
3306
 
3307
3307
  // src/version.ts
3308
- var KERNEL_VERSION = true ? "1.147.0" : "0.0.0-dev";
3308
+ var KERNEL_VERSION = true ? "1.147.1" : "0.0.0-dev";
3309
3309
  var OS_RELEASE = "6.0.0-slicc";
3310
3310
  function procVersion() {
3311
3311
  return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
@@ -2963,7 +2963,7 @@ var KERNEL_VERSION, OS_RELEASE;
2963
2963
  var init_version = __esm({
2964
2964
  "src/version.ts"() {
2965
2965
  "use strict";
2966
- KERNEL_VERSION = true ? "1.147.0" : "0.0.0-dev";
2966
+ KERNEL_VERSION = true ? "1.147.1" : "0.0.0-dev";
2967
2967
  OS_RELEASE = "6.0.0-slicc";
2968
2968
  }
2969
2969
  });
@@ -14428,9 +14428,20 @@ var init_wasix_linker = __esm({
14428
14428
  this.publisher?.({ kind: "slot", index: index3, handle, name: name2 });
14429
14429
  return index3;
14430
14430
  }
14431
+ heapAlloc(bytes) {
14432
+ const exports = this.main?.exports;
14433
+ const calloc = exports?.calloc;
14434
+ if (typeof calloc !== "function") return void 0;
14435
+ const state = exports?.asyncify_get_state;
14436
+ if (typeof state === "function" && state() !== 0) return void 0;
14437
+ const at = calloc(1, bytes) >>> 0;
14438
+ return at === 0 ? void 0 : at;
14439
+ }
14431
14440
  allocate(size, alignment) {
14432
14441
  if (size === 0) return 0;
14433
14442
  const to = Math.max(alignment, 16);
14443
+ const heap = this.heapAlloc(size + to - 16);
14444
+ if (heap !== void 0) return align(heap, to);
14434
14445
  const pages2 = Math.ceil((size + (to > PAGE2 ? to : 0)) / PAGE2);
14435
14446
  return align(this.memory.grow(pages2) * PAGE2, to);
14436
14447
  }