[movitz-cvs] CVS update: movitz/losp/lib/malloc-init.lisp

Frode Vatvedt Fjeld ffjeld at common-lisp.net
Wed Jul 7 17:37:11 UTC 2004


Update of /project/movitz/cvsroot/movitz/losp/lib
In directory common-lisp.net:/tmp/cvs-serv31139

Modified Files:
	malloc-init.lisp 
Log Message:
These checkins more or less complete the migration to the new
basic-vector data-structure. All traces of the old vector structure
should be gone.

Date: Wed Jul  7 10:37:11 2004
Author: ffjeld

Index: movitz/losp/lib/malloc-init.lisp
diff -u movitz/losp/lib/malloc-init.lisp:1.3 movitz/losp/lib/malloc-init.lisp:1.4
--- movitz/losp/lib/malloc-init.lisp:1.3	Wed Jun  9 16:00:57 2004
+++ movitz/losp/lib/malloc-init.lisp	Wed Jul  7 10:37:11 2004
@@ -10,7 +10,7 @@
 ;;;; Author:        Frode Vatvedt Fjeld <frodef at acm.org>
 ;;;; Created at:    Wed Jan  9 15:57:22 2002
 ;;;;                
-;;;; $Id: malloc-init.lisp,v 1.3 2004/06/09 23:00:57 ffjeld Exp $
+;;;; $Id: malloc-init.lisp,v 1.4 2004/07/07 17:37:11 ffjeld Exp $
 ;;;;                
 ;;;;------------------------------------------------------------------
 
@@ -19,9 +19,15 @@
 
 (in-package muerte.lib)
 
-(let ((memsize (muerte.x86-pc::memory-size))
-      (start (truncate (* 2 1024 1024) 4096))) ; XXX We really should calcucalte this..
-  ;; (format t "Memory: ~D MB.~%" memsize)
-  (muerte:malloc-initialize start (- (* memsize #x100) start)))
+(let* ((stack-vector (%run-time-context-slot 'muerte::stack-vector))
+       (kernel-end (+ (* 4 (muerte:object-location stack-vector))
+		      8 (* 4 (array-dimension stack-vector 0))))
+       (memsize (muerte.x86-pc::memory-size))
+       (start (truncate (+ kernel-end 4095) 4096)))
+  (muerte:malloc-initialize start (- (* memsize #x100) start))
+  (loop for x from (truncate kernel-end 4) below (* start 1024)
+      do (setf (memref x 0 0 :unsigned-byte32) 0))
+  ;; (format t "Memory: ~D MB. Malloc area at ~D K.~%" memsize (* start 4))
+  (values))
 
 





More information about the Movitz-cvs mailing list