[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sr-dev
Subject:    Re: [Serdev] Memory usage
From:       Andrei Pelinescu-Onciul <pelinescu-onciul () fokus ! fraunhofer ! de>
Date:       2004-10-28 18:13:31
Message-ID: 20041028181331.GB5876 () fokus ! fraunhofer ! de
[Download RAW message or body]

On Oct 24, 2004 at 02:24, Gilles, Philippe Bernard <gb@IPDirections.Net> wrote:
> Hy,
> 
> I am trying to include some features in SER but I am blocked by missing \
> documentation on memory usage : 
> What happens when i use pkg_malloc to modify the message by insert_lump_after (for \
> example) ? Is that memory freed after the processing of the message ? Is any memory \
> allocated by pkg_malloc freed after the procesing of the message ? I noted that \
> nathelper.c uses it that way for fixing the contact header field, but if the memory \
> if never freed, its a problem, no ?

The memory used for lumps must be pkg_malloc'ed and it's automatically
freed after the processing of the message (so you must not free it).
> 
> Another point is that if I modify (using lump functions) the "To" header field (or \
> any part of the message) before calling "save" (or another function that deals with \
> the modified part of the message), the modification are not taken in account. Is \
> there a way to fix that ?

No. The modifications are applied just before the message is sent.
A quick hack would be to loop the message over the loopback.


Andrei


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic