[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: LPEG on Solaris
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 1 Jun 2016 16:05:46 -0300
> LuaJIT supports Solaris/Illumos, with the single caveat that one
> cannot use lightuserdata on the stack. While LuaJIT was very
> accommodating to changes required to support
> Solaris/Illumos, this particular incompatibility is not something that
> can be fixed easily:
> LuaJIT uses pointer compaction and does not support pointers using high bits.
> Illumos and its derivatives use high bits on stack memory: they are
> just incompatible!
> So, if lpeg wants to support Solaris/Illumus it has to avoid using
> lightusedata residing the stack.
> Fortunately, the problem very easy to circumvent on the application
> side, by making surgical changes that are easy to reason about, as in
> the PR.
I can try to avoid using lightuserdata on the stack (although that
is a quite useful technique). However, the proposed solution does
not seem to be the way to do it.
First, it has a perceptible cost for quick matches. (In a dirty check,
I got more than 50% of time increase for trivial matches due to the
constant allocation/deallocation.) Second, it leaks memory in case of