apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@covalent.net>
Subject Re: apr_mmap interface (was: Re: mmap buckets are a bit bogus)
Date Fri, 08 Jun 2001 05:07:24 GMT
From: "Greg Stein" <gstein@lyra.org>
Sent: Wednesday, June 06, 2001 8:53 PM


> Euh... to be clear, this isn't related to the MMAP buckets, right? You're
> talking about the MMAP interface.

Correct, I stumbled on the abuse because the MMAP bucket read is the only abuser
of this sillyness.

> I would agree: the offset seems rather bogus. Why not just return the
> ptr/len of the mmap and let the user add to the pointer (as necessary).

Exactly.  Ryan mentioned we need that pointer to deallocate later, but if you
read the win32 implementation, we already had to stow that as a set-aside.  
Win32 required a page-aligned map, which I didn't believe we should/could
guarentee the caller would pass.

> Oh, christ. Looking at the function, that is exactly what it does. A pointer
> add. Let's toss the darn function.
> 
> And while looking at apr_mmap.h: why is the structure public? Ack! That guy
> should be private.

Ryan was quite sure we needed the members for something, but I absolutely agree.
If we were missing the length or something, then let's just address that.  If we
needed it within apr for shmem or something, we can always (within apr) peek
under the covers, and grab the private mmap.h file.  Better yet, add the missing
accessor function.



Mime
View raw message