Mail Archives: cygwin/2007/01/09/09:16:14
On Tue, Jan 09, 2007 at 12:56:43PM +0100, Corinna Vinschen wrote:
> > Okay, I understand where you're coming from. Where I'm coming from is that it
> > is difficult to generate a test case that actually demonstrates the issue
> > outside of the scope of my application. Suffice to say, I do see the errors in
> > strace output - and I can see MapViewNT returning an error in the double-map
> > -so-we-can-have-4k-pseudopages version.
>
> I'm under the impression you're getting something upside-down. Windows
> has 4K system pages, but an allocation granularity of 64K. For a long
> time I stubbornly tried to stick with 4K pagesize for POSIX applications,
> but the code got more and more complicated because there was always yet
> another situation which just didn't work correctly due to the 64K
> allocation granularity.
extern "C" size_t
getpagesize ()
{
if (!system_info.dwPageSize)
GetSystemInfo (&system_info);
return (size_t) system_info.dwAllocationGranularity;
}
size_t
getsystempagesize ()
{
if (!system_info.dwAllocationGranularity)
GetSystemInfo (&system_info);
return (size_t) system_info.dwPageSize;
}
Turns out I was reading these backwards, yes.
$ ./psz
psz == 4096, ag == 65536
I'll try and reanalyze some of the other stuff tomorrow.
-cl
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -