system_context_size(3)

πŸ“¦
version 0.7.1 Β· 2 versions
, in nixos 26.05

πŸ’… 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-stack to keep resource usage low, which is honestly just good hygiene 🧚

πŸŽ€ NOTES πŸŽ€

  1. accepted values for newlim are 0 < n <= 65536 β€” so literally anything above 0 and at or below 65536. don't push it past that. πŸ™ˆ
  2. 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 πŸ’œ
  3. invalid context sizes is a terminal state transition πŸ’€ periodt. do not test this for fun.
  4. 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 -10 is not 0 < n.
function system_context_size0()
      system_context_size(-10);
end

πŸ’€ MISUSE πŸ’€

and this one? 0 is also not 0 < n. zero is excluded, so this is a terminal state transition. do not pass go, do not collect 200. πŸ’…
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