Commit Graph
1 Commits
Author SHA1 Message Date
LibretroAdmin 5335635718 Stack frames stay within 4 KiB, and 2 KiB in libretro-common
Buffers of a path's size or more that sat in a function's frame - or in
a callee's, once inlined - live elsewhere:

- on the heap: the gzip index builder's input and window, the gzip
  extractor's (kept with its state), the CHD reader's feed buffer (made
  on first use), the gzip index name and its template, the M3U reader's
  paths, a cue's directory, the PGS log line past 512 bytes, and in
  libretro-common the copy's destination directory, the dirent stat's
  joined path, the abbreviated-or-relative working paths and the CPU
  class values;
- static, where one thread uses them one call at a time: the default
  and runtime Pcsx2Config (25 KB each), the IOP HLE host-file paths, and
  the VU flag pass's visited set, one per VU since VU0 and VU1 may
  compile at once;
- shared: the NVRAM and MEC file paths take turns in one buffer, and an
  extra ROM's name is built in a std::string.

The runtime config LoadSettings carries over is moved rather than
copied.

tests/stackframe compiles every first-party source the Makefile builds,
with its flags, under -Werror=frame-larger-than=4096 (2048 for
libretro-common).
2026-10-09 04:48:31 +02:00