render3d: frame keeps 32 to 16 - tables and queues sized at start-up, the rest declared; birth leaks freed

The texture and framebuffer tables grow to 4096/1024 and gvk_prime's queue is made in
gvk_startup_state; gpu_unit_2d's and the actor lists' lazy starts go. @alloc_ok on layer_room (a layer
outgrowing its cap), overlay_init, gvk_read_screen, gvk_hdr_metadata (a settings change), DLSS's
gsl_struct/gsl_fn, an actor's part tables (given back by actor_release) and the pool's fallback.
Birth leaks freed: gpu_caps_probe's create structs, gpu_caps_fake's text, gvk_note's line,
gvk_layout_key's table and each key it grew from, ov_text_wrap's slices, the default sky path.
(ludic deps --births still lists freed sites: its walk does not see free().) Compiled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-28 16:46:17 +03:00
parent 6fb5118afd
commit 46000362ba
9 changed files with 60 additions and 20 deletions

View file

@ -30,6 +30,7 @@ function gvk_note(render3d_st: mut Render3dState, msg: string) -> void {
let line = msg + "\n"
file_write(f, line, len(line))
file_close(f)
free(line)
}
function gvk_handle(out: bytes) -> long { return Vk.get_i64(out, 0) }
@ -747,6 +748,10 @@ function gvk_startup_state(render3d_st: mut Render3dState) -> void {
if render3d_st.gvk_retired_frame == null { render3d_st.gvk_retired_frame = new []int }
if render3d_st.gvk_buf_gpu == null { render3d_st.gvk_buf_gpu = new []int }
if render3d_st.gvk_retired_buf == null { render3d_st.gvk_retired_buf = new []long; render3d_st.gvk_retired_mem = new []long }
# the prime queue, and the texture and framebuffer tables grown to their working size, now
gvk_prime_tables(render3d_st)
gpu_tx_at(render3d_st, 4095)
gpu_fb_at(render3d_st, 1023)
# room made now in every list play pushes into, so a push never grows one (plan 25.2)
gvk_room_int(render3d_st.gvk_retired_frame, GVK_LIST_ROOM)
gvk_room_long(render3d_st.gvk_retired_buf, GVK_LIST_ROOM)