head     56.3;
access   paws bayes jws quist brad dew jwh;
symbols  ;
locks    ; strict;
comment  @# @;


56.3
date     93.01.27.13.29.42;  author jwh;  state Exp;
branches ;
next     56.2;

56.2
date     93.01.27.12.07.11;  author jwh;  state Exp;
branches ;
next     56.1;

56.1
date     91.11.05.09.51.28;  author jwh;  state Exp;
branches ;
next     55.1;

55.1
date     91.08.25.10.27.01;  author jwh;  state Exp;
branches ;
next     54.1;

54.1
date     91.03.18.15.30.04;  author jwh;  state Exp;
branches ;
next     53.1;

53.1
date     91.03.11.19.30.03;  author jwh;  state Exp;
branches ;
next     52.1;

52.1
date     91.02.19.09.14.03;  author jwh;  state Exp;
branches ;
next     51.1;

51.1
date     91.01.30.16.13.59;  author jwh;  state Exp;
branches ;
next     50.1;

50.1
date     90.10.29.16.28.47;  author jwh;  state Exp;
branches ;
next     49.1;

49.1
date     90.08.14.14.12.41;  author jwh;  state Exp;
branches ;
next     48.1;

48.1
date     90.07.26.11.18.59;  author jwh;  state Exp;
branches ;
next     47.1;

47.1
date     90.05.14.11.02.40;  author dew;  state Exp;
branches ;
next     46.1;

46.1
date     90.05.07.08.49.46;  author jwh;  state Exp;
branches ;
next     45.1;

45.1
date     90.04.19.15.57.42;  author jwh;  state Exp;
branches ;
next     44.1;

44.1
date     90.04.01.22.14.48;  author jwh;  state Exp;
branches ;
next     43.1;

43.1
date     90.03.20.14.06.48;  author jwh;  state Exp;
branches ;
next     42.1;

42.1
date     90.01.23.17.51.33;  author jwh;  state Exp;
branches ;
next     41.1;

41.1
date     89.12.22.11.33.48;  author jwh;  state Exp;
branches ;
next     40.1;

40.1
date     89.09.29.11.55.10;  author jwh;  state Exp;
branches ;
next     39.1;

39.1
date     89.09.26.16.39.47;  author dew;  state Exp;
branches ;
next     38.1;

38.1
date     89.08.29.11.31.45;  author jwh;  state Exp;
branches ;
next     37.1;

37.1
date     89.05.12.11.45.05;  author dew;  state Exp;
branches ;
next     36.1;

36.1
date     89.02.06.10.22.54;  author dew;  state Exp;
branches ;
next     35.1;

35.1
date     89.02.02.13.38.07;  author dew;  state Exp;
branches ;
next     34.1;

34.1
date     89.01.23.16.13.20;  author jwh;  state Exp;
branches ;
next     33.1;

33.1
date     89.01.16.11.45.02;  author dew;  state Exp;
branches ;
next     32.1;

32.1
date     89.01.10.11.53.59;  author bayes;  state Exp;
branches ;
next     31.1;

31.1
date     88.12.14.18.15.01;  author bayes;  state Exp;
branches ;
next     30.1;

30.1
date     88.12.09.13.51.58;  author dew;  state Exp;
branches ;
next     29.1;

29.1
date     88.10.31.15.36.49;  author bayes;  state Exp;
branches ;
next     28.1;

28.1
date     88.10.06.11.03.16;  author dew;  state Exp;
branches ;
next     27.1;

27.1
date     88.09.30.09.36.16;  author bayes;  state Exp;
branches ;
next     26.1;

26.1
date     88.09.28.13.21.34;  author bayes;  state Exp;
branches ;
next     25.1;

25.1
date     88.03.02.09.37.39;  author bayes;  state Exp;
branches ;
next     24.1;

24.1
date     87.08.31.10.03.38;  author jws;  state Exp;
branches ;
next     23.1;

23.1
date     87.08.26.10.41.37;  author bayes;  state Exp;
branches ;
next     22.1;

22.1
date     87.08.17.11.27.45;  author bayes;  state Exp;
branches ;
next     21.1;

21.1
date     87.08.12.14.09.42;  author bayes;  state Exp;
branches ;
next     20.1;

20.1
date     87.07.30.11.23.40;  author bayes;  state Exp;
branches ;
next     19.1;

19.1
date     87.06.01.08.36.50;  author jws;  state Exp;
branches ;
next     18.1;

18.1
date     87.05.20.15.39.38;  author bayes;  state Exp;
branches ;
next     17.1;

17.1
date     87.04.30.10.48.21;  author jws;  state Exp;
branches ;
next     16.1;

16.1
date     87.04.26.15.59.17;  author jws;  state Exp;
branches ;
next     15.1;

15.1
date     87.04.13.09.37.13;  author jws;  state Exp;
branches ;
next     14.1;

14.1
date     87.04.01.15.44.13;  author jws;  state Exp;
branches ;
next     13.1;

13.1
date     87.02.28.18.43.30;  author jws;  state Exp;
branches ;
next     12.1;

12.1
date     87.02.02.13.35.24;  author jws;  state Exp;
branches ;
next     11.1;

11.1
date     87.01.19.10.01.47;  author jws;  state Exp;
branches ;
next     10.1;

10.1
date     86.12.24.11.14.09;  author jws;  state Exp;
branches ;
next     9.1;

9.1
date     86.12.12.14.57.07;  author bayes;  state Exp;
branches ;
next     8.1;

8.1
date     86.11.27.12.10.19;  author jws;  state Exp;
branches ;
next     7.1;

7.1
date     86.11.20.14.15.27;  author hal;  state Exp;
branches ;
next     6.1;

6.1
date     86.11.04.18.14.10;  author paws;  state Exp;
branches ;
next     5.1;

5.1
date     86.10.28.17.02.29;  author hal;  state Exp;
branches ;
next     4.1;

4.1
date     86.09.30.19.58.49;  author hal;  state Exp;
branches ;
next     3.2;

3.2
date     86.09.17.09.36.32;  author hal;  state Exp;
branches ;
next     3.1;

3.1
date     86.09.01.12.09.02;  author hal;  state Exp;
branches ;
next     2.1;

2.1
date     86.07.30.14.57.46;  author hal;  state Exp;
branches ;
next     1.1;

1.1
date     86.06.30.15.56.02;  author danm;  state tmp;
branches ;
next     ;


desc
@Base file for PWS 3.2 release.

@


56.3
log
@
pws2rcs automatic delta on Wed Jan 27 13:14:25 MST 1993
@
text
@						 (*

 (c) Copyright Hewlett-Packard Company, 1986.
All rights are reserved.  Copying or other
reproduction of this program except for archival
purposes is prohibited without the prior
written consent of Hewlett-Packard Company.


	    RESTRICTED RIGHTS LEGEND

Use, duplication, or disclosure by the Government
is subject to restrictions as set forth in
paragraph (b) (3) (B) of the Rights in Technical
Data and Computer Software clause in
DAR 7-104.9(a).

HEWLETT-PACKARD COMPANY
Fort Collins, Colorado                         *)


(* Roger Ison - 3/2/83 - 3:32 pm  *)
(* Modified for 32-bit addresses SFB - 9/2/86  *)

$modcal,debug off,range off$
$stackcheck off$        (* 2-Mar-83 -- 3:32 pm *)

external module sysglobals;
  export
    var
      escapeco: -32768..32767;
      FIBptr: integer;
      tryrec: integer;
      heapmax: integer;
      heapbase: integer;
      ioresult: integer;
  end;

module hpm;

import
   heapmax,       { integer/anyptr }
   heapbase;      { integer/anyptr }

export

  procedure Hestablish;
  procedure New (var object:integer; bytesize:integer);
  procedure Dispose (var object:integer; bytesize:integer);
  procedure Mark (var nextfreeword:integer);
  procedure Release (nextfreeword:integer);

implement

  const
    nilptr = 0;             {integer equivalent of nil pointer}
   {maxptr = 16777215;      {biggest physical address}
   {smallest = 2;           {smallest allocatable object (words)}
    smallest = 3;           {smallest allocatable object (words)}
    stdblk = 16;            {largest "standard" object}
    otherlist = stdblk+1;   {for nonstandard objects}
  type
    stdlists = smallest..stdblk;
    allists = smallest..otherlist;
    pointer = integer {nilptr..maxptr};
   {pointertrick =  packed record
			 case boolean of
		  true:  ( longform: integer );
		  false: ( highbyte: 0..255;
			   lower3: pointer  )
		    end;}
    mp = ^memblock;
    memblock = {packed} record
		 smallsize: 0..255;
		 link: pointer;
		 case  {smallsize=0}  boolean of
	       true: ( bigsize: integer )
	       end;
    freearray =  array [allists] of pointer;
    dsap = ^dsa;
    dsa = record
	     fakeone: memblock;
	     freelist: freearray;
	     wordsdisposed: integer;
	     dirty: boolean;
	  end;


  {
  procedure Newwords (var p:anyptr; wordlen:integer);  external;
  }
 {function longpointer (p:pointer): integer;
  var  t: pointertrick;
  begin
    t.lower3 := p;   t.highbyte := 255;
    longpointer := t.longform
  end;}

 {function shortpointer (p:integer): pointer;
  var  t: pointertrick;
  begin
    t.longform := p;  shortpointer := t.lower3
  end;}

  function getsize (p:pointer): integer;
  var  size: integer;
  begin
    with mp(p)^ do
      begin
	size := mp(p)^.smallsize;
	if size = 0 then size := bigsize;
	getsize := size;
      end;
  end;

  procedure putsize (p:pointer; size:integer);
  begin
    with mp(p)^ do
      if size > otherlist then
	begin  smallsize := 0; bigsize := size  end
      else
	smallsize := size;
  end;

  procedure Hestablish;
  const
    emptydsa =
      dsa [ fakeone:memblock[smallsize:(smallest-1),link:nilptr],
	    freelist:freearray[(otherlist-smallest+1) of nilptr],
	    wordsdisposed:0, dirty:false ];
  var
    i: allists;
  begin
    Newwords(anyptr(heapbase),(sizeof(dsa)+1) div 2);
    dsap(heapbase)^ := emptydsa;
  end;  {Hestablish}

  procedure recombine;
  label 1,2;
  var
    fakeaddr,f,g,this,thislink,flimit,highmark: pointer;
    fsize,gsize,wordcount: integer;  i: allists;
  begin
    with dsap(heapbase)^ do
      begin
       {highmark := shortpointer(heapmax);}
       {fakeaddr := shortpointer(integer(addr(fakeone)));}
	highmark := heapmax;
	fakeaddr := integer(addr(fakeone));
	fakeone.link := nilptr;
	fakeone.smallsize := smallest-1;
	for i := smallest to otherlist do
	  while freelist[i] <> nilptr do
	    begin
	      f := freelist[i];
	      freelist[i] := mp(f)^.link;
	      this := fakeaddr;
	      thislink := mp(this)^.link;
	      while thislink <> nilptr do
		if thislink > f then goto 2
		else
		  begin
		    this := thislink;
		    thislink := mp(this)^.link;
		  end;
2:            mp(f)^.link := thislink;
	      mp(this)^.link := f;
	    end;
	f := fakeone.link;  wordcount := 0;
	while f <> nilptr do
	  begin
	    if highmark < f then goto 1;
	    fsize := getsize(f);
	    flimit := f+fsize+fsize;
	    while mp(f)^.link = flimit do {adjacent}
	      begin
		g := mp(f)^.link;
		mp(f)^.link := mp(g)^.link;
		gsize := getsize(g);
		flimit := g+gsize+gsize;
	      end; {while}
	    if highmark <= flimit then
	      begin
	       {heapmax := longpointer(f);}
		heapmax := f;
		goto 1;
	      end;
	    fsize := (flimit-f) div 2;
	    wordcount := wordcount+fsize;
	    putsize(f,fsize);
	    if fsize > otherlist then i:=otherlist
				 else i:=fsize;
	    g := mp(f)^.link;
	    mp(f)^.link := freelist[i];
	    freelist[i] := f;
	    f := g;
	  end; {f<>nil}
1:      dirty := false;  wordsdisposed := wordcount;
      end; {with heapbase}
  end;  {recombine}

  procedure hreturn (p:pointer; wordlen:integer);
  var  list: allists;
  begin
    with dsap(heapbase)^,mp(p)^ do
      begin
	if wordlen < 0
	  then wordlen := -wordlen
	  else wordsdisposed := wordsdisposed+wordlen;
	dirty := true;
	if wordlen > otherlist then list := otherlist
			       else list := wordlen;
	putsize(p,wordlen);
	link := freelist[list];
	freelist[list] := p;
      end; {with}
  end;  {hreturn}

  procedure hallocate (var p:pointer; wordlen:integer);
  var  longp: anyptr;

    function tryit: pointer;
    label 1,2;
    var
      temp,prev,next: pointer;
      lfrag,j,len,size: integer;
    begin
      with dsap(heapbase)^ do
	begin  len := wordlen;
	  if len < otherlist then
	    begin
	      temp := freelist[len];
	      if temp <> nilptr then
		begin
		  freelist[len] := mp(temp)^.link;
		  goto 1
		end;
	    end;
	  lfrag := len+smallest;
	  for size := lfrag to stdblk do
	    begin
	      temp := freelist[size];
	      if temp <> nilptr then
		begin
		  freelist[size] := mp(temp)^.link;
		  hreturn(temp+len+len,len-size);
		  goto 1
		end;
	    end;
	  prev := nilptr;  next := freelist[otherlist];
	  while next <> nilptr do
	    begin
	      size := getsize(next);
	      if (size=len) or (size>=lfrag) then goto 2;
	      prev := next; next := mp(next)^.link;
	    end;
2:        temp := next;
	  if next <> nilptr then
	    begin
	      if prev = nilptr
		then freelist[otherlist] := mp(next)^.link
		else mp(prev)^.link:=mp(next)^.link;
	      if size <> len then
		hreturn(next+len+len,len-size);
	    end;
1:        if temp <> nilptr then
	    wordsdisposed := wordsdisposed-wordlen;
	  tryit := temp;
	end;  {with heapbase}
    end;  {tryit}

  begin {hallocate}
    p := tryit;
    if (p=nilptr) and dsap(heapbase)^.dirty then
      begin  recombine;  p := tryit  end;
    if p = nilptr then
      begin
	Newwords(longp,wordlen);
       {p := shortpointer(integer(longp));}
	p := integer(longp);
      end;
  end;  {hallocate}

  procedure Mark {var nextfreeword:pointer};
    begin
      nextfreeword := heapmax;
    end;

  procedure Release {nextfreeword:integer};
    begin
      heapmax := nextfreeword;
      if heapbase <> nilptr then recombine;
    end;

  procedure New {var object:integer; bytesize:integer};
  var  ptr: pointer;  wordsize: integer;
  begin
    wordsize := (bytesize+1) div 2;
    if heapbase = nilptr then
      Newwords(anyptr(object),wordsize)
    else
      begin
	if wordsize < smallest then wordsize := smallest;
	if dsap(heapbase)^.wordsdisposed < wordsize then
	  Newwords(anyptr(object),wordsize)
	else
	  begin
	    hallocate(ptr,wordsize);
	   {object := longpointer(ptr);}
	    object := ptr;
	  end;
      end;
  end;  {New}

  procedure Dispose {var object:integer; bytesize:integer};
  var  ptr: pointer;  wordsize: integer;
  begin
    if heapbase <> nilptr then
      begin
	wordsize := (bytesize+1) div  2;
	if wordsize < smallest then wordsize := smallest;
       {ptr:=shortpointer(object);}
	ptr:=object;
	if ptr = nilptr then escape(-3);
	hreturn(ptr,wordsize)
      end;
    object := nilptr;
  end;  {Dispose}

end.  {heapmanager}

@


56.2
log
@
pws2rcs automatic delta on Wed Jan 27 11:57:27 MST 1993
@
text
@d1 331
@


56.1
log
@Automatic bump of revision number for PWS version 3.25
@
text
@a0 331
						 (*

 (c) Copyright Hewlett-Packard Company, 1986.
All rights are reserved.  Copying or other
reproduction of this program except for archival
purposes is prohibited without the prior
written consent of Hewlett-Packard Company.


	    RESTRICTED RIGHTS LEGEND

Use, duplication, or disclosure by the Government
is subject to restrictions as set forth in
paragraph (b) (3) (B) of the Rights in Technical
Data and Computer Software clause in
DAR 7-104.9(a).

HEWLETT-PACKARD COMPANY
Fort Collins, Colorado                         *)


(* Roger Ison - 3/2/83 - 3:32 pm  *)
(* Modified for 32-bit addresses SFB - 9/2/86  *)

$modcal,debug off,range off$
$stackcheck off$        (* 2-Mar-83 -- 3:32 pm *)

external module sysglobals;
  export
    var
      escapeco: -32768..32767;
      FIBptr: integer;
      tryrec: integer;
      heapmax: integer;
      heapbase: integer;
      ioresult: integer;
  end;

module hpm;

import
   heapmax,       { integer/anyptr }
   heapbase;      { integer/anyptr }

export

  procedure Hestablish;
  procedure New (var object:integer; bytesize:integer);
  procedure Dispose (var object:integer; bytesize:integer);
  procedure Mark (var nextfreeword:integer);
  procedure Release (nextfreeword:integer);

implement

  const
    nilptr = 0;             {integer equivalent of nil pointer}
   {maxptr = 16777215;      {biggest physical address}
   {smallest = 2;           {smallest allocatable object (words)}
    smallest = 3;           {smallest allocatable object (words)}
    stdblk = 16;            {largest "standard" object}
    otherlist = stdblk+1;   {for nonstandard objects}
  type
    stdlists = smallest..stdblk;
    allists = smallest..otherlist;
    pointer = integer {nilptr..maxptr};
   {pointertrick =  packed record
			 case boolean of
		  true:  ( longform: integer );
		  false: ( highbyte: 0..255;
			   lower3: pointer  )
		    end;}
    mp = ^memblock;
    memblock = {packed} record
		 smallsize: 0..255;
		 link: pointer;
		 case  {smallsize=0}  boolean of
	       true: ( bigsize: integer )
	       end;
    freearray =  array [allists] of pointer;
    dsap = ^dsa;
    dsa = record
	     fakeone: memblock;
	     freelist: freearray;
	     wordsdisposed: integer;
	     dirty: boolean;
	  end;


  {
  procedure Newwords (var p:anyptr; wordlen:integer);  external;
  }
 {function longpointer (p:pointer): integer;
  var  t: pointertrick;
  begin
    t.lower3 := p;   t.highbyte := 255;
    longpointer := t.longform
  end;}

 {function shortpointer (p:integer): pointer;
  var  t: pointertrick;
  begin
    t.longform := p;  shortpointer := t.lower3
  end;}

  function getsize (p:pointer): integer;
  var  size: integer;
  begin
    with mp(p)^ do
      begin
	size := mp(p)^.smallsize;
	if size = 0 then size := bigsize;
	getsize := size;
      end;
  end;

  procedure putsize (p:pointer; size:integer);
  begin
    with mp(p)^ do
      if size > otherlist then
	begin  smallsize := 0; bigsize := size  end
      else
	smallsize := size;
  end;

  procedure Hestablish;
  const
    emptydsa =
      dsa [ fakeone:memblock[smallsize:(smallest-1),link:nilptr],
	    freelist:freearray[(otherlist-smallest+1) of nilptr],
	    wordsdisposed:0, dirty:false ];
  var
    i: allists;
  begin
    Newwords(anyptr(heapbase),(sizeof(dsa)+1) div 2);
    dsap(heapbase)^ := emptydsa;
  end;  {Hestablish}

  procedure recombine;
  label 1,2;
  var
    fakeaddr,f,g,this,thislink,flimit,highmark: pointer;
    fsize,gsize,wordcount: integer;  i: allists;
  begin
    with dsap(heapbase)^ do
      begin
       {highmark := shortpointer(heapmax);}
       {fakeaddr := shortpointer(integer(addr(fakeone)));}
	highmark := heapmax;
	fakeaddr := integer(addr(fakeone));
	fakeone.link := nilptr;
	fakeone.smallsize := smallest-1;
	for i := smallest to otherlist do
	  while freelist[i] <> nilptr do
	    begin
	      f := freelist[i];
	      freelist[i] := mp(f)^.link;
	      this := fakeaddr;
	      thislink := mp(this)^.link;
	      while thislink <> nilptr do
		if thislink > f then goto 2
		else
		  begin
		    this := thislink;
		    thislink := mp(this)^.link;
		  end;
2:            mp(f)^.link := thislink;
	      mp(this)^.link := f;
	    end;
	f := fakeone.link;  wordcount := 0;
	while f <> nilptr do
	  begin
	    if highmark < f then goto 1;
	    fsize := getsize(f);
	    flimit := f+fsize+fsize;
	    while mp(f)^.link = flimit do {adjacent}
	      begin
		g := mp(f)^.link;
		mp(f)^.link := mp(g)^.link;
		gsize := getsize(g);
		flimit := g+gsize+gsize;
	      end; {while}
	    if highmark <= flimit then
	      begin
	       {heapmax := longpointer(f);}
		heapmax := f;
		goto 1;
	      end;
	    fsize := (flimit-f) div 2;
	    wordcount := wordcount+fsize;
	    putsize(f,fsize);
	    if fsize > otherlist then i:=otherlist
				 else i:=fsize;
	    g := mp(f)^.link;
	    mp(f)^.link := freelist[i];
	    freelist[i] := f;
	    f := g;
	  end; {f<>nil}
1:      dirty := false;  wordsdisposed := wordcount;
      end; {with heapbase}
  end;  {recombine}

  procedure hreturn (p:pointer; wordlen:integer);
  var  list: allists;
  begin
    with dsap(heapbase)^,mp(p)^ do
      begin
	if wordlen < 0
	  then wordlen := -wordlen
	  else wordsdisposed := wordsdisposed+wordlen;
	dirty := true;
	if wordlen > otherlist then list := otherlist
			       else list := wordlen;
	putsize(p,wordlen);
	link := freelist[list];
	freelist[list] := p;
      end; {with}
  end;  {hreturn}

  procedure hallocate (var p:pointer; wordlen:integer);
  var  longp: anyptr;

    function tryit: pointer;
    label 1,2;
    var
      temp,prev,next: pointer;
      lfrag,j,len,size: integer;
    begin
      with dsap(heapbase)^ do
	begin  len := wordlen;
	  if len < otherlist then
	    begin
	      temp := freelist[len];
	      if temp <> nilptr then
		begin
		  freelist[len] := mp(temp)^.link;
		  goto 1
		end;
	    end;
	  lfrag := len+smallest;
	  for size := lfrag to stdblk do
	    begin
	      temp := freelist[size];
	      if temp <> nilptr then
		begin
		  freelist[size] := mp(temp)^.link;
		  hreturn(temp+len+len,len-size);
		  goto 1
		end;
	    end;
	  prev := nilptr;  next := freelist[otherlist];
	  while next <> nilptr do
	    begin
	      size := getsize(next);
	      if (size=len) or (size>=lfrag) then goto 2;
	      prev := next; next := mp(next)^.link;
	    end;
2:        temp := next;
	  if next <> nilptr then
	    begin
	      if prev = nilptr
		then freelist[otherlist] := mp(next)^.link
		else mp(prev)^.link:=mp(next)^.link;
	      if size <> len then
		hreturn(next+len+len,len-size);
	    end;
1:        if temp <> nilptr then
	    wordsdisposed := wordsdisposed-wordlen;
	  tryit := temp;
	end;  {with heapbase}
    end;  {tryit}

  begin {hallocate}
    p := tryit;
    if (p=nilptr) and dsap(heapbase)^.dirty then
      begin  recombine;  p := tryit  end;
    if p = nilptr then
      begin
	Newwords(longp,wordlen);
       {p := shortpointer(integer(longp));}
	p := integer(longp);
      end;
  end;  {hallocate}

  procedure Mark {var nextfreeword:pointer};
    begin
      nextfreeword := heapmax;
    end;

  procedure Release {nextfreeword:integer};
    begin
      heapmax := nextfreeword;
      if heapbase <> nilptr then recombine;
    end;

  procedure New {var object:integer; bytesize:integer};
  var  ptr: pointer;  wordsize: integer;
  begin
    wordsize := (bytesize+1) div 2;
    if heapbase = nilptr then
      Newwords(anyptr(object),wordsize)
    else
      begin
	if wordsize < smallest then wordsize := smallest;
	if dsap(heapbase)^.wordsdisposed < wordsize then
	  Newwords(anyptr(object),wordsize)
	else
	  begin
	    hallocate(ptr,wordsize);
	   {object := longpointer(ptr);}
	    object := ptr;
	  end;
      end;
  end;  {New}

  procedure Dispose {var object:integer; bytesize:integer};
  var  ptr: pointer;  wordsize: integer;
  begin
    if heapbase <> nilptr then
      begin
	wordsize := (bytesize+1) div  2;
	if wordsize < smallest then wordsize := smallest;
       {ptr:=shortpointer(object);}
	ptr:=object;
	if ptr = nilptr then escape(-3);
	hreturn(ptr,wordsize)
      end;
    object := nilptr;
  end;  {Dispose}

end.  {heapmanager}

@


55.1
log
@Automatic bump of revision number for PWS version 3.25A
@
text
@@


54.1
log
@Automatic bump of revision number for PWS version 3.24
@
text
@@


53.1
log
@Automatic bump of revision number for PWS version 3.24B
@
text
@@


52.1
log
@Automatic bump of revision number for PWS version 3.24A
@
text
@@


51.1
log
@Automatic bump of revision number for PWS version 3.24d
@
text
@@


50.1
log
@Automatic bump of revision number for PWS version 3.23c
@
text
@@


49.1
log
@Automatic bump of revision number for PWS version 3.24b
@
text
@@


48.1
log
@Automatic bump of revision number for PWS version 3.24a
@
text
@@


47.1
log
@Automatic bump of revision number for PWS version 3.23
@
text
@@


46.1
log
@Automatic bump of revision number for PWS version 3.23
@
text
@@


45.1
log
@Automatic bump of revision number for PWS version 3.23C
@
text
@@


44.1
log
@Automatic bump of revision number for PWS version 3.23B
@
text
@@


43.1
log
@Automatic bump of revision number for PWS version 3.23aA
@
text
@@


42.1
log
@Automatic bump of revision number for PWS version 3.23e
@
text
@@


41.1
log
@Automatic bump of revision number for PWS version 3.23d
@
text
@@


40.1
log
@Automatic bump of revision number for PWS version 3.23c
@
text
@@


39.1
log
@Automatic bump of revision number for PWS version 3.23b
@
text
@@


38.1
log
@Automatic bump of revision number for PWS version 3.23a
@
text
@@


37.1
log
@Automatic bump of revision number for PWS version 3.3a
@
text
@@


36.1
log
@Automatic bump of revision number for PWS version 3.22
@
text
@@


35.1
log
@Automatic bump of revision number for PWS version 3.22
@
text
@@


34.1
log
@Automatic bump of revision number for PWS version 3.22
@
text
@@


33.1
log
@Automatic bump of revision number for PWS version 3.22D
@
text
@@


32.1
log
@Automatic bump of revision number for PWS version 3.22C
@
text
@@


31.1
log
@Automatic bump of revision number for PWS version 3.22B
@
text
@@


30.1
log
@Automatic bump of revision number for PWS version 3.22A
@
text
@@


29.1
log
@Automatic bump of revision number for PWS version 3.22b
@
text
@@


28.1
log
@Automatic bump of revision number for PWS version 3.3b
@
text
@@


27.1
log
@Automatic bump of revision number for PWS version 3.3a
@
text
@@


26.1
log
@Automatic bump of revision number for PWS version 3.3 Synch
@
text
@@


25.1
log
@Automatic bump of revision number for PWS version 3.2Y
@
text
@@


24.1
log
@Automatic bump of revision number for PWS version 3.2
@
text
@@


23.1
log
@Automatic bump of revision number for PWS version 3.2P
@
text
@@


22.1
log
@Automatic bump of revision number for PWS version 3.2N
@
text
@@


21.1
log
@Automatic bump of revision number for PWS version 3.2M
@
text
@@


20.1
log
@Automatic bump of revision number for PWS version 3.2L
@
text
@@


19.1
log
@Automatic bump of revision number for PWS version 3.2K
@
text
@@


18.1
log
@Automatic bump of revision number for PWS version 3.2J
@
text
@@


17.1
log
@Automatic bump of revision number for PWS version 3.2I+
@
text
@@


16.1
log
@Automatic bump of revision number for PWS version 3.2I
@
text
@@


15.1
log
@Automatic bump of revision number for PWS version 3.2H
@
text
@@


14.1
log
@Automatic bump of revision number for PWS version 3.2G
@
text
@@


13.1
log
@Automatic bump of revision number for PWS version 3.2F
@
text
@@


12.1
log
@Automatic bump of revision number for PWS version 3.2E
@
text
@@


11.1
log
@Automatic bump of revision number for PWS version 3.2D
@
text
@@


10.1
log
@Automatic bump of revision number for PWS version 3.2C
@
text
@@


9.1
log
@Automatic bump of revision number for PWS version 3.2B
@
text
@@


8.1
log
@Automatic bump of revision number for PWS version 3.2A
@
text
@@


7.1
log
@Automatic bump of revision number for PWS version 3.2l
@
text
@@


6.1
log
@Automatic bump of revision number for PWS version 3.2k
@
text
@@


5.1
log
@Automatic bump of revision number for PWS version 3.2j
@
text
@@


4.1
log
@Automatic bump of revision number for PWS version 3.2i
@
text
@@


3.2
log
@Changes from Scott Bayes for Bobcat-32.
@
text
@@


3.1
log
@Automatic bump of revision number for PWS version 3.2h
@
text
@d3 1
a3 1
 (c) Copyright Hewlett-Packard Company, 1983.
d23 2
d54 1
d57 3
a59 2
    maxptr = 16777215;      {biggest physical address}
    smallest = 2;           {smallest allocatable object (words)}
d65 2
a66 2
    pointer = nilptr..maxptr;
    pointertrick =  packed record
d71 1
a71 1
		    end;
d73 1
a73 1
    memblock = packed record
d87 2
d92 1
a92 1
  function longpointer (p:pointer): integer;
d97 1
a97 1
  end;
d99 1
a99 1
  function shortpointer (p:integer): pointer;
d103 1
a103 1
  end;
d146 4
a149 2
	highmark := shortpointer(heapmax);
	fakeaddr := shortpointer(integer(addr(fakeone)));
d184 2
a185 1
		heapmax := longpointer(f);
d279 2
a280 1
	p := shortpointer(integer(longp));
d309 2
a310 1
	    object := longpointer(ptr);
d322 2
a323 1
	ptr:=shortpointer(object);
@


2.1
log
@Auto bump rev number to 2.1 for sys 3.2e.
@
text
@@


1.1
log
@Initial revision
@
text
@@
