Re: Porting to 64-bit platforms

  • From: Emil Dotchevski <emil@xxxxxxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Tue, 20 Aug 2013 12:24:43 -0700

On Tue, Aug 20, 2013 at 2:11 AM, Mike Pall <mike-1308@xxxxxxxxxx> wrote:
> Emil Dotchevski wrote:
>> I followed several leads but there is no way to obtain such addresses
>> on this platform. The APIs that can do that on Windows are not
>> available. Obviously, I do hope that someone proves me wrong. :)
>
> Well, better check what happens when you do this:
>
>   void *p = VirtualAlloc((void *)0x12340000, 0x10000, MEM_RESERVE|MEM_COMMIT, 
> PAGE_READWRITE);
>   printf("%p\n", p);

Yes this was tried, probing doesn't work. We also looked at the
address at which the executable is mapped. It appears that Microsoft
has deliberately made the lowest addresses unavailable.

This issue reminds me of the zero page in the 6502 address space,
except back then the OS couldn't take it away. :)

Emil

Other related posts: