memory tracking/limiting on x64?

  • From: Josh Haberman <jhaberman@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Wed, 20 Mar 2013 10:47:35 -0700

I see that LuaJIT on x64 doesn't support an alloc function.  I can
understand the likely reasons for this, but I'm wondering if there is
any way to track and limit the amount of memory LuaJIT will use.

I don't actually care about being able to implement the allocation
itself, I just want a hook that lets me:

- track the total memory usage
- veto any further heap growth

Setting a static memory limit on LuaJIT, while it would be better than
nothing, isn't ideal because the memory limit I'm trying to enforce is
a combination of LuaJIT's memory and other memory being used for
processing the request.

Any ideas?

Other related posts: