[Vm-dev] Is it possible to compile stack vm without heartbeat?
elpochodelagente at gmail.com
Fri Sep 9 15:17:28 UTC 2011
excelent! I saw your mail in the list but didn't know that you came to a
solution for the problem. I think that using a single-threaded VM will be
better in the short term, as it's much easier to debug and so to get
everything working. I'll check your code.
On Fri, Sep 9, 2011 at 11:41 AM, Dimitry Golubovsky <golubovsky at gmail.com>wrote:
> It looks you are following the same trail I have been walking on for
> some time (I mean Android Cog).
> Feel free to borrow my experience from this repo:
> and also VMMaker-oscog and CMakeVMMaker packages in
> In general, I turned Stack Cog into an event-driven VM (like Andreas
> did some time ago in his Android port of Classic VM).
> I believe that for any kind of embedding this approach of making an
> event-driven VM is preferrable.
> I remember asking a similar question some time ago, here:
> As a by-product of my Android port, I created a Unix EventVM (see
> StackEvtUnixConfig class in CMakeVMMaker) though it is not polished.
> It uses two extra files in the Unix platform: sqUnixEvtBeat.c and
> sqUnixEvtMain.c. The former is transformed sqheartbeat.c, the latter
> is replacement of sqUnixMain.c with dummy external event loop (as it
> no longer belongs to the interpreter).
> You also may look at the android version of the same file
> (sqAndroidEvtBeat.c in the android platform) where all time-fetching
> functions request actual time from the underlying OS (calling
> gettimeofday() and similar functions instead of getting time from a
> memory location updated by another thread).
> Besides, my VM is single-threaded. I do use SIGALRM though, to limit
> maximal time in interpreter so Android does not kill the application,
> however NaCL's policy may be different.
> Anyway, this may be a long discussion, Feel free to ask.
> Dimitry Golubovsky
> Anywhere on the Web
Lic. Javier Pimás
Ciudad de Buenos Aires
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev