On Thu, 12 Mar 2009 09:29:15 +0700, Bembi Prima <[email protected]> wrote:
>Bart, what is the benefit of creating a large stack size? Is it deciding of >how much memory my program can take? I still don't understand what stack >size are..As for TList, I think a simple array will require less memory than >TList. But it's worth to try, because I think unlike setlength, TList >doesn't need a big continuous empty space of memory, thanks Bart. procedures parameters and local variables are stack allocated items ... it's how the program knows which of the possible many copies is the current one when a procedure is called recursively. It's also why infinite recursion causes the program to crash. It's also useful to know ... if a procedure does not need to change a large item passed as a variable then passing it as a CONST parameter saves stack space (all that get passed is a pointer). A

