ikarus/src/ikarus.collect.ss

39 lines
754 B
Scheme
Raw Normal View History

2006-11-23 19:42:39 -05:00
2007-04-30 00:50:10 -04:00
(library (ikarus collect)
(export do-overflow do-overflow-words do-vararg-overflow collect
do-stack-overflow)
(import (ikarus)
(only (scheme) $fxsll))
2006-11-23 19:42:39 -05:00
2007-04-30 00:50:10 -04:00
(define do-overflow
2006-11-23 19:42:39 -05:00
(lambda (n)
(foreign-call "ik_collect" n)
(void)))
(define do-overflow-words
2006-11-23 19:42:39 -05:00
(lambda (n)
(foreign-call "ik_collect" ($fxsll n 2))
(void)))
(define do-vararg-overflow
2006-11-23 19:42:39 -05:00
(lambda (n)
(foreign-call "ik_collect_vararg" n)
(void)))
(define collect
2006-11-23 19:42:39 -05:00
(lambda ()
(do-overflow 4096)))
(define do-stack-overflow
2006-11-23 19:42:39 -05:00
(lambda ()
(foreign-call "ik_stack_overflow")))
(define dump-metatable
2006-11-23 19:42:39 -05:00
(lambda ()
(foreign-call "ik_dump_metatable")))
(define dump-dirty-vector
2006-11-23 19:42:39 -05:00
(lambda ()
(foreign-call "ik_dump_dirty_vector")))
2007-04-30 00:50:10 -04:00
)