[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LuaJIT strange memory limit
- From: Mike Pall <mikelu-1011@...>
- Date: Thu, 11 Nov 2010 16:44:13 +0100
Arseny Vakhrushev wrote:
> > Well, even if that sounds strange, but your best option is to
> > compile LuaJIT as 32 bit. 32 bit processes can use close to 4GB of
> > memory under a Linux/x64 kernel. And as I've previously explained,
> > there's little performance difference with LuaJIT on x86 vs. x64.
>
> Should the hosting process be compiled as 32bit as well?
Yes. Linking mixed x86 and x64 object files doesn't work.
To get the most out of x86, compile all your other C files with
-march=native -fomit-frame-pointer, enable -DLUAJIT_CPU_SSE2 and
link LuaJIT statically on x86 (less important for x64).
> But, as I said before, the 1Gb memory is shared between all of
> the LuaJIT threads within the process.
Yes, sadly that's true on Linux/x64 right now. With some effort I
could bump that up to around 2GB (avoiding MAP_32BIT and resorting
to address probing). But that won't suffice for your use case.
--Mike