Stack size
You can specify stack size only for a user-defined routine written in C.
Stack space is allocated from a common region in shared memory
that can be overrun if a routine consumes more stack space than is
allocated for it. To avoid stack overrun:
- Allocate sufficient stack space for all the local variables in the routine. Monitor stack usage with the onstat utility.
- Execute recursively called C routines with the mi_call() function. Pass any arguments other than mi_integer data types by reference.
When you specify a stack size for a user-defined routine, the database server allocates the specified amount of memory for every execution iteration of the routine.