Mega Code Archive

 
Categories / Delphi / Examples
 

Fix stack overflow errors [=runtime error 202]

In Delphi 1, under "Options"/"Compiler"/"Linker", you set stack amd local heap sizes. This is equivalent to the $M compiler directive in TP - and probably in Delphi, too. The trick is to fit these and your data area into 64k, i.e. make them both 16.384, and you have 32k left for variables. If you then get "Data segment too large" (see above!), you have to shove some of your variables onto the heap with Getmem() etc.