On 14/05/2022 03:34, Hairy Pixels via fpc-pascal wrote:
On May 13, 2022, at 11:08 PM, Michael Van Canneyt via 
fpc-pascal<fpc-pascal@lists.freepascal.org>  wrote:

Is there an “alloca" like function in the RTL which allocates memory from the 
stack? For examplehttps://man7.org/linux/man-pages/man3/alloca.3.html
No such function exists in FPC.
Is alloca something which is part of the OS or can this be implemented by 
programmers or used from other libraries?

It compiler support for the allocation to actually happen on the stack. When it's actually implemented in a library (rather than redirect to a compiler intrinsic via a C macro), it will generally just allocate on the heap instead.


Jonas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to