Hacker News new | ask | show | jobs
by kusmi 3167 days ago
I don't need it to be faster, I need it to stop crashing whenever I try to stuff over 2GB into memory.
1 comments

I hear ya.... try:

* Building with LJ_GC64 mode. [1]

It is newer but people are using it and it has been merged by Mike Pall into v2.1. Still beta though.

* Using FFI to allocate large objects or large pools of small objects.

I made some simple containers to help with the FFI parts [2] and also a (not recently updated) jemalloc binding [3] to help tune memory usage. Here's a gist I made with some experimental results [4].

[1] https://github.com/LuaJIT/LuaJIT/issues/25

[2] https://github.com/neomantra/lds

[3] https://github.com/neomantra/luajit-jemalloc

[4] https://gist.github.com/neomantra/9122165