Artifact e9774ef3930b018ab756299c82905786ebde4f5751433e02ea574332cd4a2e01:


%%%% GET-HEAP-BOUNDS - looks up the addresses of the Syslisp variables
%%%   HeapLast and HeapLowerBound and makes it so that the Lisp function
%%%   HeapLast() returns the value of the variable HeapLast and the
%%%   Lisp function HeapLowerBound() returns the value of the variable
%%%   HeapLowerBound.  Dec-20 only.

(compiletime (load if-system syslisp))

% This depends on exactly the code generated for the CONS function
% on the Dec-20.  Very, very brittle code!

(fluid '(!%heaplast-address))

(if_system PDP10
(de get-heap-bounds ()
  (setq !%heaplast-address (inf (wgetv (getfcodepointer 'cons) 2)))))

(de heaplast ()
  (getmem !%heaplast-address))

% This depends on the order of declarations in PI:ALLOCATORS.RED and the
% way storage is assigned for Syslisp variables.

(de heaplowerbound ()
  (wgetv !%heaplast-address 2))

(get-heap-bounds)


REDUCE Historical
REDUCE Sourceforge Project | Historical SVN Repository | GitHub Mirror | SourceHut Mirror | NotABug Mirror | Chisel Mirror | Chisel RSS ]