[OpenSER-Devel] RFC: memory management in database modules
Dan Pascu
dan at ag-projects.com
Fri Feb 8 10:21:54 UTC 2008
On Friday 08 February 2008, Bogdan-Andrei Iancu wrote:
> Hi Dan,
>
> I agree - but on the other hand, if possible, we should try to reduce
> as much as possible the impact. If I'm walking on a muddy street, I try
But that is the point, you can't. You constantly allocate memory for
processing SIP messages that vary in size, plus small chunks allocated
for parsing certain headers that also vary a lot in size. It doesn't
matter much if memory gets fragmented after 3 days of usage or after 6.
There are about 700 places pkg_malloc is used in the code and about half
of that where shm_malloc is used. Relying on programming guidelines to
avoid fragmentation will simply not work.
> to get dirty as less as possible, even is 100% that I will get dirty in
> some percentage ;)
If you keep walking long enough you'll keep getting dirtier. I expect my
proxy to run for a long time without restarts.
--
Dan
More information about the Devel
mailing list