From gstein@lyra.org Tue Jan 2 04:10:13 2001 Return-Path: Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Delivered-To: mailing list dev@apr.apache.org Received: (qmail 1313 invoked from network); 2 Jan 2001 04:10:13 -0000 Received: from test.webdav.org (HELO kurgan.lyra.org) (198.144.203.199) by h31.sny.collab.net with SMTP; 2 Jan 2001 04:10:13 -0000 Received: (from gstein@localhost) by kurgan.lyra.org (8.9.3/8.9.3) id UAA10823 for dev@apr.apache.org; Mon, 1 Jan 2001 20:15:06 -0800 X-Authentication-Warning: kurgan.lyra.org: gstein set sender to gstein@lyra.org using -f Date: Mon, 1 Jan 2001 20:15:06 -0800 From: Greg Stein To: dev@apr.apache.org Subject: Re: cvs commit: apr-util/src/buckets ap_buckets_file.c Message-ID: <20010101201506.N10567@lyra.org> Mail-Followup-To: dev@apr.apache.org References: <20010101192336.K10567@lyra.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: ; from rbb@covalent.net on Mon, Jan 01, 2001 at 08:04:25PM -0800 X-URL: http://www.lyra.org/greg/ X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N 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(). Cheers, -g -- Greg Stein, http://www.lyra.org/