apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: cvs commit: apr-util/src/buckets ap_buckets_file.c
Date Tue, 02 Jan 2001 04:15:06 GMT
On Mon, Jan 01, 2001 at 08:04:25PM -0800, rbb@covalent.net 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().


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

View raw message