Subj : Re: How can I make a very large program run? To : borland.public.cpp.borlandcpp From : Bob Gonder Date : Fri Feb 13 2004 04:22 pm Richard Hufford wrote: >> And your Stack! A Stack of 5a8 seems rather paultry to me. > >Surely, my stack is bigger than that! I haven't had much success reading >Win32 maps. That BSS is the stack? My DEF file has a STACKSIZE and a >HEAPSIZE of 2000000. Since changing this number to 1800000 in both >statements made the problem go away, I did some reading about it. Although Mine is HEAPSIZE 1265536,1132768 STACKSIZE 1265536,1132768 >Because Debug is off, could it be that all the code is going into one >segment and some segment limit is reached? This _is_ a 32 bit Windows app, right? 32bit Win apps only have _one_ (4GB) segment. Everything (data, code,stack,dll's) must fit in 2GB. The upper 2 GB is reserved for MS. Also, they aren't "segments" anymore, but "selectors". You would normally have 3 selectors: Code, Data and Stack. They all "point" to the same addresses, just have different access abilities. So, for instance, if you have the Data address of a variable, you could access it through SS:Addr or CS:Addr or the normal DS:Addr. It's all the same, but you'd have dificulties storing a value at CS:Addr or executing at SS:Addr. (There's a 4th selector, but that's another topic) One of the things the Full Debug probably does is turn off in-line code (turning them into functions calls). Might you be bumping up against a dll that was "based" too low for you? They should be relocatable so they can load above your app. Are you compressing the exe? Wonder if the decompress might overwrite a loaded dll? Well, if the bandaides run out, you can just claim that the app requires Win-64 and a terabyte of ram. .