[gambit-list] processor state

Marc Feeley feeley at iro.umontreal.ca
Mon Feb 10 08:01:50 EST 2014


On Feb 10, 2014, at 1:51 AM, Vijay Mathew <vijay.the.lisper at gmail.com> wrote:

> C API macros like CHARSTRING_to_SCMOBJ takes a processor state as first argument. What is the purpose of this?
> 
> Thanks,
> 
> --Vijay

I have been gradually adding multicore support to Gambit over the past few months.  In the past there was just one “processor” (where the term processor means an OS thread that is executing Scheme code).  The goal is to support multiple processors, each with their own heap section where they allocate memory.  So the “processor state” parameter of CHARSTRING_to_SCMOBJ, and other C interface functions that can allocate Scheme objects, indicates in which processor’s heap to do the allocation.  The special case of a NULL pointer indicates the allocation of a “permanent” object (in a separate area which is never deallocated).

Just this weekend I got multiple Gambit VMs running in the same OS process.  The support for this is still alpha quality and there are issues to solve, but its moving in the right direction!

Marc




More information about the Gambit-list mailing list