Re: [Exim] freeing store in local_scan()

Góra strony
Delete this message
Reply to this message
Autor: Phil Chambers
Data:  
Dla: exim-users
Temat: Re: [Exim] freeing store in local_scan()
On Thu, 27 Feb 2003 11:00:15 +0000 (GMT) Philip Hazel <ph10@???> wrote:

> On Thu, 27 Feb 2003, Phil Chambers wrote:
>
> > Exim 4.12:
> >
> > Section 38.5 says that store_get() is available for use in
> > local_scan(). There is no reference to freeing store.
>
> There is no need to free memory obtained with store_get(). It will be
> automatcally cleaned up by Exim at the end of receiving the message
> (which is not long after local_scan() finishes). I already have a note
> to expand the explanation in the manual for the next edition.
>


Can I ask for further clarification? If more than one message is received in a
single SMTP transaction, local_scan() is called fore each one. Is all memory
obtained by store_get() freed between messages?

I ask this because I intend to have local_scan() read a file and do not wish to
re-read it if local_scan() is called several times in one session. I will hold the
settings I have read from the file in memory and use static pointers to the memory.
I need to know if store_get()'s memory will be freed because, if it is, I will need
to use direct calls to malloc().

Phil.
---------------------------------------
Phil Chambers (postmaster@???)
University of Exeter