Re: mmap failing with MAP_FIXED

2022-07-04 Thread Corinna Vinschen
On Jul 1 17:33, David Allsopp wrote: > This program fails at the second mmap call with EINVAL: > > #include > #include > #include > > int main (void) { > void * mem; > /* Reserve 256MB address space for the minor heaps */ > mem = mmap(0, 268439552, PROT_NONE, MAP_PRIVATE |

Re: mmap failing with MAP_FIXED

2022-07-01 Thread gs-cygwin . com
On Fri, Jul 01, 2022 at 05:33:31PM +0100, David Allsopp wrote: > This program fails at the second mmap call with EINVAL: > > #include > #include > #include > > int main (void) { > void * mem; > /* Reserve 256MB address space for the minor heaps */ > mem = mmap(0, 268439552,

mmap failing with MAP_FIXED

2022-07-01 Thread David Allsopp
This program fails at the second mmap call with EINVAL: #include #include #include int main (void) { void * mem; /* Reserve 256MB address space for the minor heaps */ mem = mmap(0, 268439552, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); if (mem == MAP_FAILED) e

Re: mmap failing

2008-01-06 Thread Linda Walsh
Wayne Christopher wrote: I have a 268MB file open for writing. I close it and then immediately try to mmap() it, and a get ENOMEM. However I do have the VM space available and can malloc() the size of the file right after the failure. Also, I have mmap()'ed other similar files in the same pr

Re: mmap failing

2007-12-17 Thread Wayne Christopher
My test program is attached. This example works but in my real program the same write+close+mmap sequence did not. It appears that calling fsync before the close sometimes avoids the error but not always. This is Cygwin 1.5.24(0.156/4/2). Any thoughts? Thanks, Wayne Corinna Vinschen w

Re: mmap failing

2007-12-16 Thread Corinna Vinschen
On Dec 14 13:59, Wayne Christopher wrote: > I have a 268MB file open for writing. I close it and then > immediately try to mmap() it, and a get ENOMEM. However I do have the > VM space available and can malloc() the size of the file right after the > failure. Also, I have mmap()'ed other simila

mmap failing

2007-12-14 Thread Wayne Christopher
I have a 268MB file open for writing. I close it and then immediately try to mmap() it, and a get ENOMEM. However I do have the VM space available and can malloc() the size of the file right after the failure. Also, I have mmap()'ed other similar files in the same program before this, but the