/[cmucl]/src/code/foreign.lisp
ViewVC logotype

Diff of /src/code/foreign.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by ram, Fri Feb 8 13:32:52 1991 UTC revision 1.6 by ram, Fri Aug 30 17:09:22 1991 UTC
# Line 11  Line 11 
11  ;;;  ;;;
12  ;;; **********************************************************************  ;;; **********************************************************************
13  ;;;  ;;;
 ;;; $Header$  
 ;;;  
 ;;; Load-foreign and support routines.  
 ;;;  
14  (in-package "SYSTEM")  (in-package "SYSTEM")
15    
16  (in-package "EXT")  (in-package "EXT")
# Line 22  Line 18 
18  (in-package "SYSTEM")  (in-package "SYSTEM")
19  (import 'ext:load-foreign)  (import 'ext:load-foreign)
20    
   
 (defconstant foreign-segment-start #x00C00000)  
 (defconstant foreign-segment-size  #x00400000)  
   
21  (defvar *previous-linked-object-file* nil)  (defvar *previous-linked-object-file* nil)
22  (defvar *foreign-segment-free-pointer* foreign-segment-start)  (defvar *foreign-segment-free-pointer* foreign-segment-start)
23    
# Line 64  Line 56 
56    (drsize ext:unsigned-long))    (drsize ext:unsigned-long))
57    
58  (defun allocate-space-in-foreign-segment (bytes)  (defun allocate-space-in-foreign-segment (bytes)
59    (let* ((pagesize-1 (1- (gr-call* mach:vm_statistics *task-self*)))    (let* ((pagesize-1 (1- (get-page-size)))
60           (memory-needed (logandc2 (+ bytes pagesize-1) pagesize-1))           (memory-needed (logandc2 (+ bytes pagesize-1) pagesize-1))
61           (addr (int-sap *foreign-segment-free-pointer*))           (addr (int-sap *foreign-segment-free-pointer*))
62           (new-ptr (+ *foreign-segment-free-pointer* bytes)))           (new-ptr (+ *foreign-segment-free-pointer* bytes)))
# Line 232  Line 224 
224          (when old-file          (when old-file
225            (mach:unix-unlink old-file)))))            (mach:unix-unlink old-file)))))
226    (format t ";;; Done.~%"))    (format t ";;; Done.~%"))
   
   
   

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.5