diff options
| author | 2026-04-03 21:45:17 +0100 | |
|---|---|---|
| committer | 2026-04-04 01:37:54 +0100 | |
| commit | 2ee93c3f46f8e948d2331eab46c95322a88874ee (patch) | |
| tree | b3a39f8e79ef725579b569748ac4be28b82b1266 /src/con_.h | |
| parent | e174011b5e7390dc8714910185aaa40d0a44702f (diff) | |
| download | sst-2ee93c3f46f8e948d2331eab46c95322a88874ee.tar.gz sst-2ee93c3f46f8e948d2331eab46c95322a88874ee.zip | |
Size-optimise cvar value cleanup
Put all the cvars together contiguously; then we don't need to generate
lots of individual calls to extfree() and can instead simply iterate a
fixed-sized array.
Diffstat (limited to 'src/con_.h')
| -rw-r--r-- | src/con_.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -273,7 +273,14 @@ extern struct _con_vtab_iconvar_wrap { } _con_vtab_iconvar_wrap; #define _con_vtab_iconvar _con_vtab_iconvar_wrap.vtable +#ifdef _WIN32 +#define _CON_VAR_SEG ".rdata$y" +#else +#define _CON_VAR_SEG ".rodata.cvars1" +#endif + #define _DEF_CVAR(name_, desc, value, hasmin_, min, hasmax_, max, flags_) \ + __attribute__((section(_CON_VAR_SEG))) \ static struct con_var _cvar_##name_ = { \ .base = { \ .vtable = _con_vtab_var, \ |
