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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

memory problem 1

Status
Not open for further replies.

knersboy

Technical User
Apr 16, 2006
3
NL
i am writing a particle packing algorithm. i find that once the memory consumption of my program gets above +/-120 meg (happens for large particle systems) the program slows considerably. the memory consumption is caused mostly by objects, but the number of objects is static for each run, with the number of objects created being 3 times the number of particles. i have 3 gig of ram running on a pentium xeon 3.06 gig machine.

why is it slowing once i go above a certain memory level? any help will be appreciated, thanks.

greg
 
Delphi 7? try to find someone who has memory sleught on his shelve.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-"There is always another way to solve it, but I prefer my way.
 
Hi Nordlund
Yes, it is delphi 7. i dont have memory sleuth, but i used memproof. i found that when it starts slowing (large particle systems as mentioned above) what happens is that the virtual memory resource size starts dropping (and eventually reaches zero).

Memproof gives an error (for the large systems, not for smaller ones) which states "VirtualAlloc reserves or commits a region of pages in the virtual address space of the calling process. The allocated pages must be freed with VirtualFree when no longer needed".

I am an engineer who uses programming as a tool, so i am no expert but to me it seems that over a certain size the program is switching to a different type of memory which is slowing the algorithm. There seems to be a certain size when it just switches, up to there is runs great (say 9000 particles) but above that, this happens. Surely if there was a serious problem in the code this problem would be there for small as well as large systems.

Thanks
Greg
 
try to use another memory manager than borland's :


borland finally admitted that their memory manager sucks big time and they switched to fastMM in Delpi2006

Cheers,
Daddy

-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
dude, you are my daddy!

it worked, thanks man and it is written by a south african guy who lives in the town where i used to live.

cheers to you.
 
lol,

its a small world out there, glad I could help you out!

[thumbsup2]


-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
knersboy, could you share with us answers to the following questions:
1) What did fastmm enable you to do regarding the problem you were experiencing?

2) How did you solve the memory problem where there were a large number of particles?

Clive
Runner_1Revised.gif

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer." (Paul Ehrlich)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top