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

I would like someone could give me a hint

Status
Not open for further replies.

edgarasm

Programmer
Oct 29, 2002
26
BR
I am developing a program in delphi to exchange messages between users. This program will be a kind of controller program which is going to be installed in a server computer in order to receive and to send messages for many users. This program will deal with many requests and responses and it will hold all the users in computer memory. I decided to use TList in order to hold information about users in memory. As I’m using Tlist and it uses Pointers, I am manipulating heap memory, ok. The problem is that I made a test holding 1000 users in heap memory and it warned me saying “insufficient Space memory”. I intended that this program would be able to deal with more than 1000 users, much more. the program got slow as well.

I would like some suggestion on the best way to tackle this problem.

I was thinking in allocating a great quantity of memory when compiling the program, like a super array, and no longer using heap memory.

I don’t know if a big array is a good idea. If it is then I would like to know how to do it. I don’t know how to deal the maximum of computer memory.

I don’t know if I was able to communicate my doubt. I’m sorry I strained writing it because my language isn’t English.
 
I had wanted to say that I intended that this program would be able to deal with more than 1000 users in the same time.

 
Keeping 1000 user names and IP addresses in memory does not seem like it would be much of a memory problem. But if you are trying to hold every message that every user sends all in memory at the same time, that could be a different story. If that is the case, you might want to swap some of the data to disk, using a temp file or something.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top