lua-users home
lua-l archive

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

Arseny Vakhrushev wrote:
> > 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.
> I suppose that this 1Gb limit is sufficient in LuaJIT only
> because of the built-in allocator since vanilla Lua doesn't
> suffer from that. Is it somehow possible to make 64-bit LuaJIT
> use the standard allocator to temporarily avoid the problem? Is
> it worth it?

Nope, that won't work. LuaJIT uses 32 bit pointers everywhere (the
standard allocators won't guarantee that). And due to other
limitations in the x64 architecture, it may only use the lowest 2GB.

Usually this is not a problem, because most Lua-based apps which
need lots of memory keep the majority of it in C structures (e.g.
huge images or database caches). You're the first one who hit that
limit in a real-world use case ...