Can setrlimit be used to force mmap to return VA within 64GB range?

100 Views Asked by At

I am working on a ARM64 server and trying to make an old program work. I don't have to source code, just a binary.

The binary uses a LuaJit which does not support 48bit Virtual Address(VA). However, my kernel uses 48bit VA.

LuaJit uses mmap to allocate memory.

I want to make mmap always return a 47bit or lower VA. I noticed setrlimit can limit a processes virtual address range. Is it just about quota or does it enforce a VA space limitation?

If it limits VA range, I think I can preload a dynamic library and call setrlimit be mmap is called.

0

There are 0 best solutions below