Os.heap_bytes: the heap without the renderer; string_temps reads it

Vk.heap_bytes pulled the Vk module - and on lang/uifree the GL window path - into a plain program,
which then failed to link (_cgl_offscreen, lgl_GetError). Os.heap_bytes is malloc_zone_statistics
through a weak reference (0 where there is none, and on Windows). Reseeded. Docs for it and for
Json.free / Json.free_all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-28 12:31:42 +03:00
parent 1adce5b58b
commit 22d1e2d66a
10 changed files with 33227 additions and 33008 deletions

View file

@ -42,9 +42,9 @@ program StringTemps {
var bad = 0
for i in 0 .. 200 { bad += round(i, a, b) }
if bad == 0 { print(7) }
let before = Vk.heap_bytes()
let before = Os.heap_bytes()
for i in 0 .. 20000 { bad += round(i, a, b) }
let grew = Vk.heap_bytes() - before
let grew = Os.heap_bytes() - before
if bad == 0 { print(`grew {grew}`) } else { print(`bad {bad}`) }
}
}