ludic/examples/lang
Orkuncakilkaya a8d54e9878 fence (25.1): every allocation goes through the fence - sites, frame judging, census, callers
Every allocation the compiler emits goes through @lp_malloc/@lp_calloc/@lp_realloc/@lp_free, and a
Ludic-level one first stores its site (function, file, line, kind) in @lp_site. Off, that is one load
and a predictable branch (30 M allocations: 0.87-0.91 s against 0.87-0.90 s on leaks2).

On (the default in a headless build, and windowed under R3D_DEV), tracking starts at the first frame
on its own and judging once R3D_ALLOC_WARM frames in a row kept nothing (600) or R3D_ALLOC_WARM_MAX
after (re)start; Mem.play()/Mem.rewarm() sends a load back to its warm-up. A judged frame that ends
holding more than it began with is reported by site with its callers (the unwinder, taken only once
judging) and fails the run with exit 86 (R3D_ALLOC_FENCE=off|count|warn|fail). R3D_ALLOC_CENSUS
writes the totals and top sites at exit. The build's defaults are --fence=, --fence-warm=,
--fence-census= or a fence line in the program's package.ludic; the environment overrides them.

The runtime is IR (emit_fence_ir.ludic, generated from a template); tracking is a side table in one
calloc'd region, so no block carries a header and pointers crossing to natives stay safe. Examples
alloc_fence, alloc_fence_leak and alloc_fence_auto with cases in ludic-dev test; reseeded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 15:35:29 +03:00
..
data feat(lang): L9 resource files - registry ... from 2026-09-24 14:00:20 +03:00
aliases.ludic feat(lang): L6 namespaces declared in Ludic - alias 2026-09-24 02:40:57 +03:00
alloc_fence.ludic fence (25.1): every allocation goes through the fence - sites, frame judging, census, callers 2026-09-28 15:35:29 +03:00
alloc_fence_auto.ludic fence (25.1): every allocation goes through the fence - sites, frame judging, census, callers 2026-09-28 15:35:29 +03:00
alloc_fence_leak.ludic fence (25.1): every allocation goes through the fence - sites, frame judging, census, callers 2026-09-28 15:35:29 +03:00
annotations.ludic feat(compiler): list literals, typed compound assignment, file:line diagnostics 2026-09-05 01:12:16 +03:00
checked.ludic feat(lang): L4 type checker between parse and emit 2026-09-24 01:34:49 +03:00
defaults.ludic feat(lang): L11 views and templates - the UI is markup, not code 2026-09-24 15:58:47 +03:00
detach.ludic refactor(cli)!: split the contributor tool out of the ludic CLI 2026-09-05 23:15:12 +03:00
floats.ludic wip(0.S3): packages and examples migrated again from their pre-0.S sources in one run 2026-09-25 15:31:34 +03:00
generics.ludic feat(lang): L5 generic records and functions 2026-09-24 02:21:15 +03:00
lifecycle.ludic chore(repo): DX cleanup — categorise examples, text-diffable golden, build/ output (#27 #28 #30) 2026-08-30 18:54:21 +03:00
long_literals.ludic wip(0.S3): packages and examples migrated again from their pre-0.S sources in one run 2026-09-25 15:31:34 +03:00
nested_templates.ludic fix(lang): a template inside another's hole, and integer literals past 2^31 - 1 2026-09-25 08:10:46 +03:00
offline_rewards.ludic chore(repo): DX cleanup — categorise examples, text-diffable golden, build/ output (#27 #28 #30) 2026-08-30 18:54:21 +03:00
operators.ludic feat(compiler): list literals, typed compound assignment, file:line diagnostics 2026-09-05 01:12:16 +03:00
qdecl.ludic feat(compiler): list literals, typed compound assignment, file:line diagnostics 2026-09-05 01:12:16 +03:00
reason.ludic refactor(cli)!: split the contributor tool out of the ludic CLI 2026-09-05 23:15:12 +03:00
registry.ludic feat(lang): L8 registries by declaration - registry and def 2026-09-24 13:34:51 +03:00
resources.ludic feat(lang): L9 resource files - registry ... from 2026-09-24 14:00:20 +03:00
rng_demo.ludic chore(repo): DX cleanup — categorise examples, text-diffable golden, build/ output (#27 #28 #30) 2026-08-30 18:54:21 +03:00
runtime_temps.ludic runtime: Log, DateTime.format, Input.text, Path, Mime, Fs, Os and Text keep nothing per call 2026-09-28 13:55:49 +03:00
scenes.ludic wip(0.S3): packages and examples migrated again from their pre-0.S sources in one run 2026-09-25 15:31:34 +03:00
string_temps.ludic Os.platform/arch uname once; render3d primes a new buffer's Metal buffer 2026-09-28 13:34:45 +03:00
strings.ludic feat(compiler): list literals, typed compound assignment, file:line diagnostics 2026-09-05 01:12:16 +03:00
time_demo.ludic chore(repo): DX cleanup — categorise examples, text-diffable golden, build/ output (#27 #28 #30) 2026-08-30 18:54:21 +03:00
toggle.ludic chore(repo): DX cleanup — categorise examples, text-diffable golden, build/ output (#27 #28 #30) 2026-08-30 18:54:21 +03:00