Re: LuaJIT on solaris 64

  • From: Mike Pall <mike-1206@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Thu, 21 Jun 2012 00:16:48 +0200

DeN Apelgants wrote:
> While evaluating LuaJIT for solaris 64 we have found 2 problems:

I currently have no plans to support Solaris/x64. Even Solaris/x86
is not officially supported (but it mostly works). I will have a
look at user-contributed patches, though.

> 1. there is a problem with creating dynamic library – thread
> http://lua-users.org/lists/lua-l/2011-06/msg00415.html. Probably
> we can live with static one but it is interesting to sort it
> out.

You'd have to compare how the C compiler emits PIC relocations vs.
the way it's done for the VM assembler code. Not sure how easy
this is to fix.

> 2. AFAIU LuaJIT uses custom memory allocator and wants to
> allocate some memory (using mmap(2) under 4GiB boundary on
> 64-bit platforms. mmap(2) on linux accepts special flag for this
> (MAP_32BIT), FreeBSD and MacOSX honors hint given as first
> mmap() argument, but Solaris always returns memory from high
> half of 64-bit address space (here is a thread about FreeBSD
> support http://lua-users.org/lists/lua-l/2010-10/msg00625.html).
> Is it possible to support/workaround?

If mmap() doesn't honor hints, then you're basically out of luck.
The low-4GB requirement is deeply ingrained in the VM.

--Mike

Other related posts: