chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Re: Some allocation and object-passing tests


From: Category 5
Subject: [Chicken-users] Re: Some allocation and object-passing tests
Date: Tue, 11 Nov 2003 11:51:33 +0000
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (berkeley-unix)

Some more interesting results.  I modified the test program slightly:

(define make-list
  (lambda (n)
    (let loop ((i 0)) (if (= i n) '() (cons i (loop (+ i 1)))))))
(define-external (scheme_callback1 ((c-pointer unsigned-char) udata))
  void
  (let ((p (pointer->object udata)))
    (gc)
    (assert (procedure? p) "assertion failed" p)
    (p (make-list 1000))))
...
(define handler (lambda (x) (print "it worked: " x)))

With these changes:

- dispatcher-gc-protect calls handler twice successfully and then dies
  with out of memory - heap full while resizing - execution terminated

- dispatcher-alloc-in-heap calls handler four times and then the
  assertion fails.

- dispatcher-malloc still works fine.

-- 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]