Hello,

 Does the following make any sense or ring any bells with anyone?:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(in-package :user)

(alien:def-alien-type cpoint
    (alien:struct cpoint
                  (x c-call:double)
                  (y c-call:double)
                  (z c-call:double)))

(defun test (&key (times 1000) (inline? nil))
  (let ((init (ext:get-bytes-consed)))
    (let ((foop (alien:make-alien cpoint)))
      (setf (alien:slot foop 'x) 0.0d0
            (alien:slot foop 'y) 1.0d0
            (alien:slot foop 'z) 2.0d0)
      (dotimes (n times) 
        (if inline?
            (list (alien:slot foop 'x)
                  (alien:slot foop 'y)
                  (alien:slot foop 'z))
          (extract-cpoint foop)))
      (alien:free-alien foop))
    (- (ext:get-bytes-consed) init)))


(defun extract-cpoint (cpoint)
  (list (alien:slot cpoint 'x)
        (alien:slot cpoint 'y)
        (alien:slot cpoint 'z)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(mccarthy:~)$ /usr/lib/cmucl/bin/lisp
CMU Common Lisp 18e, running on mccarthy.genworks.com
With core: /usr/lib/cmucl/lib/lisp.core
Dumped on: Thu, 2003-04-03 08:47:12-05:00 on orion
See <http://www.cons.org/cmucl/> for support information.
Loaded subsystems:
    Python 1.1, target Intel x86
    CLOS 18e (based on PCL September 16 92 PCL (f))
* (load (compile-file "/tmp/test-alien"))

...

* (test)
; [GC threshold exceeded with 67,296,024 bytes in use.  Commencing GC.]
; [GC completed with 60,449,576 bytes retained and 6,846,448 bytes freed.]
; [GC will next occur when at least 72,449,576 bytes are in use.]
; [GC threshold exceeded with 72,460,008 bytes in use.  Commencing GC.]
; [GC completed with 65,980,448 bytes retained and 6,479,560 bytes freed.]
; [GC will next occur when at least 77,980,448 bytes are in use.]
; [GC threshold exceeded with 77,991,384 bytes in use.  Commencing GC.]
; [GC completed with 49,431,192 bytes retained and 28,560,192 bytes freed.]
; [GC will next occur when at least 61,431,192 bytes are in use.]
; [GC threshold exceeded with 61,439,328 bytes in use.  Commencing GC.]
; [GC completed with 54,963,704 bytes retained and 6,475,624 bytes freed.]
; [GC will next occur when at least 66,963,704 bytes are in use.]
; [GC threshold exceeded with 66,974,400 bytes in use.  Commencing GC.]
; [GC completed with 60,461,264 bytes retained and 6,513,136 bytes freed.]
; [GC will next occur when at least 72,461,264 bytes are in use.]
; [GC threshold exceeded with 72,476,200 bytes in use.  Commencing GC.]
; [GC completed with 65,986,216 bytes retained and 6,489,984 bytes freed.]
; [GC will next occur when at least 77,986,216 bytes are in use.]
; [GC threshold exceeded with 77,998,656 bytes in use.  Commencing GC.]
; [GC completed with 71,489,624 bytes retained and 6,509,032 bytes freed.]
; [GC will next occur when at least 83,489,624 bytes are in use.]
; [GC threshold exceeded with 83,504,216 bytes in use.  Commencing GC.]
; [GC completed with 77,025,256 bytes retained and 6,478,960 bytes freed.]
; [GC will next occur when at least 89,025,256 bytes are in use.]
; [GC threshold exceeded with 89,037,872 bytes in use.  Commencing GC.]
; [GC completed with 65,954,816 bytes retained and 23,083,056 bytes freed.]
; [GC will next occur when at least 77,954,816 bytes are in use.]
; [GC threshold exceeded with 77,965,864 bytes in use.  Commencing GC.]
; [GC completed with 71,490,256 bytes retained and 6,475,608 bytes freed.]
; [GC will next occur when at least 83,490,256 bytes are in use.]
; [GC threshold exceeded with 83,498,560 bytes in use.  Commencing GC.]
; [GC completed with 76,973,128 bytes retained and 6,525,432 bytes freed.]
; [GC will next occur when at least 88,973,128 bytes are in use.]
; [GC threshold exceeded with 88,983,328 bytes in use.  Commencing GC.]
; [GC completed with 82,503,760 bytes retained and 6,479,568 bytes freed.]
; [GC will next occur when at least 94,503,760 bytes are in use.]
; [GC threshold exceeded with 94,515,208 bytes in use.  Commencing GC.]
; [GC completed with 33,300,808 bytes retained and 61,214,400 bytes freed.]
; [GC will next occur when at least 45,300,808 bytes are in use.]
; [GC threshold exceeded with 45,311,568 bytes in use.  Commencing GC.]
; [GC completed with 38,830,920 bytes retained and 6,480,648 bytes freed.]
; [GC will next occur when at least 50,830,920 bytes are in use.]
; [GC threshold exceeded with 50,843,320 bytes in use.  Commencing GC.]
; [GC completed with 44,316,472 bytes retained and 6,526,848 bytes freed.]
; [GC will next occur when at least 56,316,472 bytes are in use.]
; [GC threshold exceeded with 56,322,560 bytes in use.  Commencing GC.]
; [GC completed with 49,845,632 bytes retained and 6,476,928 bytes freed.]
; [GC will next occur when at least 61,845,632 bytes are in use.]
; [GC threshold exceeded with 61,854,944 bytes in use.  Commencing GC.]
; [GC completed with 55,346,240 bytes retained and 6,508,704 bytes freed.]
; [GC will next occur when at least 67,346,240 bytes are in use.]
; [GC threshold exceeded with 67,352,856 bytes in use.  Commencing GC.]
; [GC completed with 60,869,776 bytes retained and 6,483,080 bytes freed.]
; [GC will next occur when at least 72,869,776 bytes are in use.]
; [GC threshold exceeded with 72,885,480 bytes in use.  Commencing GC.]
; [GC completed with 49,822,136 bytes retained and 23,063,344 bytes freed.]
; [GC will next occur when at least 61,822,136 bytes are in use.]

222051760
* (test :inline? t)

72
* 



Thanks,

 -dave
 David J Cooper Jr, Genworks
 [EMAIL PROTECTED]
 Birmingham, Michigan
 +1 248-737-8835(o), +1 248-330-2979(c)



Reply via email to