Re: Porting to 64-bit platforms

  • From: Mike Pall <mike-1308@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Tue, 20 Aug 2013 11:11:36 +0200

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);

Or with NtAllocateVirtualMemory. If it returns non-NULL, then you
can go for the memory probing approach.

--Mike

Other related posts: