* Added a (collect-key) procedure that returns a string "k" that's

eq? to the value returned by (collect-key) until a garbage
  collection is performed.
This commit is contained in:
Abdulaziz Ghuloum 2007-08-30 22:09:13 -04:00
parent 6d1578eef5
commit 22f3ce4f79
5 changed files with 14 additions and 3 deletions

Binary file not shown.

View File

@ -263,6 +263,7 @@ ikp ik_mmap_protected(int size){
ikpcb* ik_make_pcb(){
ikpcb* pcb = ik_malloc(sizeof(ikpcb));
bzero(pcb, sizeof(ikpcb));
pcb->collect_key = false_object;
#define HEAPSIZE (1024 * 4096)
#define STAKSIZE (1024 * 4096)
//#define STAKSIZE (256 * 4096)

Binary file not shown.

View File

@ -1,10 +1,11 @@
(library (ikarus collect)
(export do-overflow do-overflow-words do-vararg-overflow collect
do-stack-overflow)
do-stack-overflow collect-key)
(import
(except (ikarus) collect)
(ikarus system $fx))
(except (ikarus) collect collect-key)
(ikarus system $fx)
(ikarus system $arg-list))
(define do-overflow
(lambda (n)
@ -36,4 +37,11 @@
(define dump-dirty-vector
(lambda ()
(foreign-call "ik_dump_dirty_vector")))
(define (collect-key)
(or ($collect-key)
(begin
($collect-key (string #\k))
(collect-key))))
)

View File

@ -761,6 +761,7 @@
[$unread-char $io]
[$arg-list $arg-list]
[$collect-key $arg-list]
[$$apply $stack]
[$fp-at-base $stack]
@ -796,6 +797,7 @@
[do-overflow-words ]
[do-vararg-overflow ]
[collect i]
[collect-key i]
[do-stack-overflow ]
[syntax-dispatch ]
))