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

mkant's metering utility in 2.0b1p3

Has anyone converted Mark Kantrowitz' metering utility to work in MCL
2.0b1p3?  If someone has already done it I'd rather not spend time
trying to figure it out.  In particular when compiling
total-bytes-consed I get the following error:

> Error: Cannot compile macptr reference to fixnum (18464)
> While executing: NX2-ABSOLUTE-LONG

Here's the code, for reference.

(defun total-bytes-consed (&aux pages fp)
  "Returns number of conses (8 bytes each)"
  (let* ((a5 (%get-ptr $currentA5))
         (ptr (%inc-ptr a5 $pagecounts)))
    (%ilsr 3 (%i+ (%i- (%ilsl 12 (%i- (setq pages (%get-word ptr 0))
		       (%i* pages $consfirstob))
                   (if (eq 0 (setq fp (%get-long a5 $lstFP)))
		     (%ilogand2 #xfff fp))))))

Since I don't care too much about consing I tried just making
total-bytes-consed return 0, but whenever I meter some code I get
stack overflow errors.  I didn't look much further than that...