Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP with -> Out of memory! 1

Status
Not open for further replies.

rafaelbr

Programmer
Jul 12, 2010
3
BR
Hi guys!

I have a problem with "Out of memory". My application has 8 threads, connection with database (Postgres) and TList. The "Out of memory" error occurs in several different places in the code. My code guard finds nothing!
I don't know what to do!

Can anybody help me?

OBS: I use C++ Builder 6.

Thanks!
 
There are several things that might cause the out of memory error. Physical memory, size of virtual memory, even CodeGuard tends to consume memory.
[ul]
[li]First, I would look at the virtual memory. You may need to reset the size of your cache.[/li]

[li]Second, what and how are you pulling data from your DB. One of the biggest mistakes is to do a deep copy of the data. That means you are trying to copy everything from the data base into your data set. Make sure you are picking up only the data you need.[/li]
[/ul]

BCB 6's help is one of the best help systems I've seen in C++Builder. Much better that the later versions. If you can't find info on how datasets pull data from the DB, post back here and I'll see if I can point you in the right direction.


James P. Cottingham
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
Hi 2ffat!

I insert FastMM in my project and the problem is over! But I will change my code to customize the get data from DB. I developed a generator of classes to easing connection with database and this overload a memory. I realized some improvement that you stated and much better.

If anybody learn about, see:
Thanks a lot!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top