apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sidinsd <sid.schip...@ga.com>
Subject Re: Emulation of /dev/zero on Windows
Date Fri, 12 Aug 2011 16:12:16 GMT

Thank you for the reply, but I am not as technically knowledgeable as you, so
I really do not know what the words "previously cross-process, unallocated
swap-backed heap" mean. I was under the impression that the MAP_ANON feature
of mmap is just like opening an mmap with an fd that points to /dev/zero.
So, in other words, any memory that you reference using the pointer that
mmap returns to you will be initialized to zeros. Is that true of the
pointer returned by apr_mmap_create under Windows? From what I could see,
APR uses the Windows APIs CreateFileMapping and MapViewOfFile to emulate the
mmap function and I don't believe those APIs support the zeroing of the
memory they obtain, but I'm not really sure of that, which is why I am
asking the question.

William A. Rowe Jr. wrote:
> 
> On 8/12/2011 9:23 AM, sidinsd wrote:
>> 
>> Since APR does not support /dev/zero, but it does support Memory Mapping
>> of
>> files (see apr_mmap_create, etc.) how does it support the MAP_ANONYMOUS
>> feature of the mmap function?
> 
> It returns previously cross-process, unallocated swap-backed heap.
> 
> 

-- 
View this message in context: http://old.nabble.com/Emulation-of--dev-zero-on-Windows-tp32250236p32251583.html
Sent from the APR Dev (Apache Portable Runtime) mailing list archive at Nabble.com.


Mime
View raw message