[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
mkant's metering utility in 2.0b1p3
- To: info-mcl@cambridge.apple.com
- Subject: mkant's metering utility in 2.0b1p3
- From: "Carl L. Gay" <cgay@skinner.cs.uoregon.edu>
- Date: Mon, 6 Jul 92 00:13:32 -0700
- Reply-to: cgay@cs.uoregon.edu
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.
ccl::
(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))
1))
(%i* pages $consfirstob))
(if (eq 0 (setq fp (%get-long a5 $lstFP)))
$pagesize
(%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...
Thanks
-Carl