added an additional variant of ALLOC_ON_STACK The new version does not use alloca(), it does not use VLA and it does not boat the stack in case huge vectors are to be processed. It uses a plain array up to a certain size and switches to malloc() above this size.