When you want to use a library function, make sure the appropriate include file is included.  For alloca there is an extra twist: for the way to include alloca.h see e.g. monet_utils.mx.  Do not hide the lack of a declaration with a cast.  The compiler then thinks the function returns an int which may well be smaller in space than the actual value, and hence some bytes of the value may get lost.
When you want to use a library function, make sure the appropriate
include file is included.  For alloca there is an extra twist: for the
way to include alloca.h see e.g. monet_utils.mx.  Do not hide the lack
of a declaration with a cast.  The compiler then thinks the function
returns an int which may well be smaller in space than the actual
value, and hence some bytes of the value may get lost.

Having said this, alloca should *not* be used in a loop.  It allocates
memory in each iteration which is only freed at the end of the
function.  If the loop loops many times, that can be a lot of memory
which is allocated on the stack (which is a very finite resource!).

Here ends today's lesson.

zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb