[fpc-pascal] alloca

Hairy Pixels genericptr at gmail.com
Sat May 14 16:37:33 CEST 2022



> On May 14, 2022, at 4:04 PM, Jonas Maebe via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
> 
> No, because most modern OSes don't allow you to address memory below the stack pointer (and for the ones that do to a limited extent, the compiler could be using that memory already).

I thought the stack had a fixed size of memory that’s in every frame and it’s just a matter of if it’s occupied by any local variables or not. Seems conceptually simple to advance the pointer as if a local variable was declared but maybe this needs to happen at compile time making alloca more of a compiler intrinsic.

Regards,
	Ryan Joseph



More information about the fpc-pascal mailing list