On Mon, Jan 01, 2001 at 08:04:25PM -0800, [EMAIL PROTECTED] wrote:
> 
> > Another possible approach (rather than getting the pool) is to have a
> > function called apr_mmap_from_file() implemented in the file_io subtree. You
> > can then pull the appropriate pool from the internal file structure and
> > construct the mmap for that file.
> 
> This doesn't solve the general problem that you are allocating data out of
> a pool, and then you lose access to the pool.

Hrm. Not sure that I understand the "lose access" part. What I was thinking
is a function that looks kind of like:

apr_status_t apr_mmap_from_file(apr_file_t *f, offset, length, flags,
                                apr_mmap_t *mm)
{
   return apr_mmap_create(mm, f, offset, length, flags, f->pool);
}

It might be possible to compute the flags from how we opened "f", so we can
lose an extra param to apr_mmap_from_file().

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Reply via email to