system_context_size(3)
π system_context_size(3) π
ok so bestie, welcome to the Arcan Lua API glow-up of this page β we're talking about system_context_size, and honestly? it's giving gatekeeper of vids. let's get into it π«Ά
β¨ NAME β¨
system_context_size β change the number of vids allowed at once in new contexts. yeah. that's the whole vibe. π
πΈ SYNOPSIS πΈ
nil
system_context_size( newlim )
that's it. one function, one arg, returns nil. no cap. β¨
π¦ DESCRIPTION π¦
okay so here's the tea β β there is a low limit on the amount of video objects that are allowed to be alive in a context. like, a cap. a hard cap. and trying to allocate past that limit? that's a terminal state transition π β not a warning, not a slap on the wrist, an actual terminal state transition.
and why, you ask? two reasons, both iconic:
- it lets you catch resource leaks early β like spotting the red flag before the whole relationship goes down π₯
- it encourages you to use the
context-stackto keep resource usage low, which is honestly just good hygiene π§
π NOTES π
- accepted values for
newlimare0 < n <= 65536β so literally anything above0and at or below65536. don't push it past that. π - these changes will not affect the currently active context β only the ones that get activated when the current context is pushed, or when the outmost context is poped. so like, the future contexts. the upcoming ones. main character energy only for the next gen π
- invalid context sizes is a terminal state transition π periodt. do not test this for fun.
- the default initial context size is set to
1k, which should be enough for everyone. yes, everyone. everyone. π
π EXAMPLE π
function system_context_size0()
local a, b = current_context_usage();
warning("current: " .. a);
warning("requesting new size");
system_context_size(64);
a, b = current_context_usage();
warning("current: " .. a);
warning("poping");
pop_video_context();
a, b = current_context_usage();
warning("current: " .. a);
end
look at her go π checking usage, requesting 64, popping the video context, checking again β the way that this function is literally just vibing and reporting. obsessed. π₯
π MISUSE π
bestie. no. π« this one is invalid because-10is not0 < n.
function system_context_size0()
system_context_size(-10);
end
π MISUSE π
and this one?0is also not0 < n. zero is excluded, so this is a terminal state transition. do not pass go, do not collect200. π
function system_context_size1()
system_context_size(0);
end
and that's the whole page, bestie π β brought to you by the Arcan Lua API, from system, dated October 2026. catch you in the next context. iykyk πβ¨π¦
π¦ where this page comes from
- nixos 26.05: arcan 0.7.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms