Repository navigation
Shell: let ports set script memory limits - #4
Conversation
|
Thanks, this looks good: it builds without warnings and the host tests pass with the defaults and with your 48-variable / 128-byte example. One small thing before I merge it: Could you add a sentence to the README section and the |
Function names in scripts use the same buffer size as variable names, so a port that lowers TDSH_VAR_NAME_MAX also shortens the longest function name a script can declare. Follow-up to #4.
|
Merged, thanks! I've added the note that |
Ports can now set
TDSH_MAX_VARS,TDSH_VAR_NAME_MAX,TDSH_VAR_VALUE_MAXandTDSH_SCRIPT_TASK_STACKfrom their build. Defaults remain 64 variables, 32-byte names, 256-byte values and a 32 KB worker stack. Each script still receives its own session and variable copy.The header and README explain the memory cost and require the same overrides in every component using
tdsh.h, including C++ consumers. The README includes a smaller-table build example.Addresses #2. TinyTang uses 48 variables and 128-byte values, saving 10,768 bytes per BL616 session.
Validation:
TinyTang's Terminal restart and catalog-allocation fixes are separate port changes. The script-loading allocation-error message remains a separate follow-up.
Reproducible checks: https://github.com/aquasock/TinyTang/blob/4633b4d/tools/tests/test_script_limits.sh