Solaris process memory usage increase but not forever

276 Views Asked by At

On Solaris 10 I have a multithreaded process with a strange behaviour. It manages complicated C++ structures (RWTVal or RWPtr). These structures are built from data stored in a database (using Pro*C). Each hour the process looks for new informacion in database, builds new structures on memory and it frees older data. But, each time it repeats this procedure, the process memory usage increases several MB (12/16MB). Process's memory usage starts from 100M until near 1,4G. Just to this point, it seems the process has memory leaks. But the strange behaviour is that after this point, the process stops to continue growing up anymore. When I try to look for memory leaks (using Purify tool) the process doesn't grow up and no significant leaks were showed. Did anyone found a similar behaviour or can explain what could be happening?

1

There are 1 best solutions below

2
On

It probable that the operating system doesn't actually "throw away" the old memory pages when you free the memory, because it will then be quicker for the application to allocate more memory if the OS don't have to allocate more pages. But only up to a limit of course.