guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: the page size bug


From: Mike Gran
Subject: Re: the page size bug
Date: Wed, 8 Mar 2017 21:32:05 +0000 (UTC)



On Wednesday, March 8, 2017 12:42 PM, Andy Wingo <address@hidden> wrote:
Hi,

> The problem with the malloc path is that not only is it a bit slower, as
> it has to page in data that might not be needed, it doesn't share memory
> between processes.  So if the system supports mmap, Guile will use mmap
> to load its ELF images (.go files).


In trying to get Guile to work on Cygwin, I've reverted to the
malloc path by #undef'ing HAVE_SYS_MMAN_H.  The mmap path is broken,
as you note.

> One solution to this issue would be to choose target-specific page
> sizes.  This is still a little tricky; on amd64 for example, systems
> commonly have 4KB pages, but they are allowed by the ABI to have any
> multiple-of-2 page size up to 64 KB.  On Cygwin, pages are 4kB but they
> can only be allocated 16 at a time.  MIPS and ARM64 can use 64K pages
> too and that's not uncommon.


Cygwin wants its users to not second-guess the 64k pagesize it
provides as its interface.  It sees the 16x 4k pagesize as an internal
detail that it is trying to abstract away.


Regards,
Mike Gran


reply via email to

[Prev in Thread] Current Thread [Next in Thread]