chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] Re: Chicken-hackers Digest, Vol 15, Issue 5


From: felix winkelmann
Subject: Re: [Chicken-hackers] Re: Chicken-hackers Digest, Vol 15, Issue 5
Date: Wed, 21 Nov 2007 13:02:49 +0100

On Nov 21, 2007 12:07 AM, Ben Kurtz <address@hidden> wrote:
> You're completely correct, the one big issue is page alignment.
> Assuming that you are malloc'ing exactly one page, this should work
> fine on OSX as well as Linux.
>
> Well, not "fine" exactly - This is undefined in POSIX because many
> things about memory page alignment are not standardized, which means
> that any code you write will be particularly susceptible to bit-rot
> (kernel or hardware changes could break it).
>
> Are you doing this to make a block executable?
>

No, just to forbid read/write access to the currently inactive heap
region. You can try it yourself by passing LOCKTOSPACE=1 to
"make". Page-size is accessed with sysconf(), I don't know whether
this is a portability issue.


cheers,
felix




reply via email to

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