Update of /project/movitz/cvsroot/movitz/losp/muerte In directory common-lisp.net:/tmp/cvs-serv16227
Modified Files: basic-functions.lisp Log Message: A small change in strategy for allocating memory.
Date: Mon Mar 22 11:37:51 2004 Author: ffjeld
Index: movitz/losp/muerte/basic-functions.lisp diff -u movitz/losp/muerte/basic-functions.lisp:1.3 movitz/losp/muerte/basic-functions.lisp:1.4 --- movitz/losp/muerte/basic-functions.lisp:1.3 Thu Feb 26 08:44:29 2004 +++ movitz/losp/muerte/basic-functions.lisp Mon Mar 22 11:37:51 2004 @@ -10,7 +10,7 @@ ;;;; Author: Frode Vatvedt Fjeld frodef@acm.org ;;;; Created at: Tue Sep 4 18:41:57 2001 ;;;; -;;;; $Id: basic-functions.lisp,v 1.3 2004/02/26 13:44:29 ffjeld Exp $ +;;;; $Id: basic-functions.lisp,v 1.4 2004/03/22 16:37:51 ffjeld Exp $ ;;;; ;;;;------------------------------------------------------------------
@@ -342,3 +342,17 @@
(defun halt-cpu () (halt-cpu)) + +(defun malloc-words (words) + (malloc-clumps (1+ (truncate (1+ words) 2)))) + +(defun malloc-clumps (clumps) + (let ((x (with-inline-assembly (:returns :eax :side-effects t) + (:compile-form (:result-mode :ebx) clumps) + (:shll 1 :ebx) + (:globally (:call (:edi (:edi-offset malloc)))) + (:addl #.(movitz::tag :other) :eax)))) + (dotimes (i clumps) + (setf (memref x -6 i :lisp) nil + (memref x -2 i :lisp) nil)) + x))