home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / bbs / pibterm / pibt3sp1 / maxblock.pas < prev    next >
Pascal/Delphi Source File  |  1985-08-11  |  2KB  |  36 lines

  1. (*----------------------------------------------------------------------*)
  2. (*  MaxBlockAvail --- returns size in bytes of largest free heap block  *)
  3. (*----------------------------------------------------------------------*)
  4.  
  5. FUNCTION MaxBlockAvail : REAL;
  6.  
  7. (*----------------------------------------------------------------------*)
  8. (*                                                                      *)
  9. (*     Function:   MaxBlockAvail                                        *)
  10. (*                                                                      *)
  11. (*     Purpose:    Returns size in bytes of largest free heap block     *)
  12. (*                                                                      *)
  13. (*     Calling Sequence:                                                *)
  14. (*                                                                      *)
  15. (*        Size := MaxBlockAvail : REAL;                                 *)
  16. (*                                                                      *)
  17. (*           Size --- returned size in bytes of largest available       *)
  18. (*                    free block on heap.                               *)
  19. (*                                                                      *)
  20. (*     Calls:  MaxAvail                                                 *)
  21. (*                                                                      *)
  22. (*----------------------------------------------------------------------*)
  23.  
  24. VAR
  25.    NParagraphs : INTEGER;
  26.  
  27. BEGIN (* MaxBlockAvail *)
  28.  
  29.    NParagraphs := MaxAvail;
  30.  
  31.    IF Nparagraphs >= 0 THEN
  32.       MaxBlockAvail := 16.0 * Nparagraphs
  33.    ELSE
  34.       MaxBlockAvail := 16.0 * ( 65536.0 + NParagraphs );
  35.  
  36. END   (* MaxBlockAvail *);ə