DEFINITION MODULE PSMCI;

(*
    Title    :  Machine Dependant Constants for Persistent Data Mgmt.
    LastEdit :  Thu Feb  9 09:48:19 1984
    Author   :  Lee Smith
    Acorn Computers VLSI Design Aids Group
*)

FROM SYSTEM IMPORT ADDRESS;

EXPORT QUALIFIED ADDRESSESPERWORD, CHARSPERWORD, PSBits, PStgBits,
                 PSBit1, PSBit2, PSBit3, PSBit4, nStgBlockSizes,
                 DefXtend, PSCANPROC;

CONST  ADDRESSESPERWORD = 4;
           CHARSPERWORD = 4;
	   
	              K = 1024;
	       DefXtend = 10*K;            (* in same units as TSIZE() *)
	       
(* DefXtend is the amount by which the (persistent) heap is entended   *)
(* when we run out of space to allocate.  By default, 10K 'units' are  *)
(* allocated. A unit is ADDRESSESPERWORD/TSIZE(WORD) addressing units. *)
	   
         nStgBlockSizes = 32;                  (* MUST be a power of 2 *)
	 
(* nStgBlockSizes is the number of separate free block lists managed   *)
(* by PStorage.  It MUST be a power of 2.  Each block is 20% bigger    *)
(* than the next smaller block; the last block is used for 'overflow'  *)
(* block-sizes which are greater than any of the 'standard sizes.      *)

	       PStgBits = {4,3,2,1,0};   (* BITSET(nStgBlockSizes - 1) *)
	       
(* PStgBits is a mask for the field in storage-block headers which is  *)
(* used EXCLUSIVELY by PStorage.  PStorage also uses the bits not used *)
(* EXCLUSIVE by PS.                                                    *)

	         PSBit1 = 31;            (* Assumed to be the most     *)
                 PSBit2 = 30;            (* significant 4 bits of a wd *)
                 PSBit3 = 29;
                 PSBit4 = 28;
                 PSBits = {PSBit1, PSBit2, PSBit3, PSBit4};
		 
(* PSBits is a mask for the field in storage-block headers which is    *)
(* EXCLUSIVELY by PS.  PS also uses the bits not used EXCLUSIVELY by   *)
(* PStorage.                                                           *)

TYPE     PSCANPROC = PROCEDURE(ADDRESS, CARDINAL, CARDINAL);

(* PSCANPROC is the TYPE of the data-structure scanning procedure used *)
(* by the DFS scanning code.  It is IMPORTed by Stab and PS.           *)

END PSMCI.
