-
Enhancement
-
Resolution: Unresolved
-
Medium
-
Code Generation Tools
-
CODEGEN-7279
-
default
As currently supplied, using just one VLA in a program requires about 32K of heap. On space limited systems, that's a lot. Somehow change the implementation so that less heap memory is required. See the related forum thread for more of the use case background.
One idea to consider ... In vla_alloc.c there is this preprocessor setting ...
/* Relatively small VLAs are allocated within blocks of NORMAL_BLOCK_SIZE bytes. It is usually a good idea to choose this number to be a little smaller than a power of 2 since many malloc implementations handle those values best. */ #define NORMAL_BLOCK_SIZE 32700
Consider making NORMAL_BLOCK_SIZE something that is defined at link time, similar to how the size of the stack and heap are handled.