TIP: Click on subject to list as thread! ANSI
echo: delphi
to: ALL
from: ALEXANDER ZAVALISHIN
date: 1997-06-05 14:11:00
subject: Serious memory problems - help!

Hello from Russia, All!
 I wonder if there is anybody here who cam help me to get out from a very 
unpleasant situation. The case is: I am writing a visual form designer 
(adapted to our local database structure). It looks much like Delphi - a user 
places diffenent components on a form and adjust their properties, a 
macro-language description is built automatically. Forms can be rather 
complicated and contain up to 200-300 components (standart components (like 
labels, groupboxes, tabbednotebooks etc.) and dbaware (dbedits and dbgrids 
mostly)). These components are generated run-time (from a macro edscription) 
and this is where the problem appears.
 I receive 'Unable to create window' error. Since local heap and stack are 
living in the data segment, I cannot increase them arbitrary. ~40 Kb are 
required for global data (DATA SIZE 39XXXKb), so I have to give only 12Kb for 
the local heap and 12Kb for the stack. Attempts to find better proportions 
(like 16 to 8, or 8 to 16, or such) has been unsuccessfull and made the 
system (Win95) to collapse. I cannot blame my computer - it is P100 with 24Mb 
RAM and enough of disk space for swapping. I've checked that there are no 
tricks with huge forms (like 200 components) if I build them in design-time.
 Of course I can reduce data size by moving typed constants to resource 
files, I probably MUST do it. But what if I'll get to the same limit after 
making my project more complicated?
 So: if we have such an unpleasant data model, how do they manage to write 
huge applications with Delphi? What is wrong? I am using Delphi I, will an 
upgrade to II or III do any good?
 It is important for me to get a key to this problem.
Best regards, Alexander
---
---------------
* Origin: Выпьем, няня, где же кружка? (2:5020/630.37)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.