I am not sure what the right place is to post this, but since we have been talking about the JIT in this thread, I thought it might be useful for others...
I have found a memory leak in the JIT, and it seems that the fix is pretty simple. Just removing the "else" branch in the following code (as_jit.cpp) seems to do the trick (It looks like a typo or a merge issue btw)
//Get the active page, or create a new one if the current one is missing or too small (256 bytes for the entry and a few ops)
if(activePage == 0 || activePage->final || activePage->getFreeSize() < 256)
activePage = new CodePage(codePageSize, reinterpret_cast<void*>(&toSize));
else
activePage->grab();
activePage->grab();
When changed into the following code, the leak disappears, and the JIT seems to be still working well. It simply removes the duplicate call to "grab" when the page already exists.
//Get the active page, or create a new one if the current one is missing or too small (256 bytes for the entry and a few ops)
if(activePage == 0 || activePage->final || activePage->getFreeSize() < 256)
activePage = new CodePage(codePageSize, reinterpret_cast<void*>(&toSize));
activePage->grab();