Allocate stacks using mmap, and mark them via the thread marker
authorAndy Wingo <wingo@pobox.com>
Fri, 22 Nov 2013 13:41:19 +0000 (14:41 +0100)
committerAndy Wingo <wingo@pobox.com>
Fri, 22 Nov 2013 13:41:19 +0000 (14:41 +0100)
commit5f18bc8450511e3616588ce20548cc365b2a81e0
treec83bc234150b00c2ea2154f103b94905745321f0
parent7af0c3b395fda906b5635323d28dd80482357aa7
Allocate stacks using mmap, and mark them via the thread marker

* libguile/threads.c (thread_mark): Mark the VM stack, if we have one.
  (on_thread_exit): Free the VM stack here.

* libguile/vm.c (make_vm): Allocate the VM stack using mmap, and arrange
  for it to be marked by the thread marker.
  (scm_i_vm_mark_stack, scm_i_vm_free_stack): New internal interfaces.
  (allocate_stack, free_stack): New helpers.
libguile/threads.c
libguile/vm.c
libguile/vm.h