home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 2 / CDPD_II_2352.bin / scope / 126-150 / scopedisk126 / enough / enough.man < prev    next >
Text File  |  1992-10-27  |  2KB  |  58 lines

  1.  
  2.      Enough               AMIGA PROGRAMMER'S MANUAL              Enough
  3.  
  4.      NAME
  5.       Enough  -  test for the availibility of ram.
  6.  
  7.      SYNOPSIS
  8.       Enough TOTAL [CHIP]
  9.  
  10.      DESCRIPTION
  11.  
  12.       This short command makes launching applications via batch files a
  13.       little safer.  We all know that the Amiga should be able to handle a
  14.       situation where your memory is running low and you try to start an
  15.       application that requires more ram than you have free, or more chip ram
  16.       than you have free.  A well written program will let you know of the
  17.       situation, if possible, and exit properly.  If there isn't even enough
  18.       ram free to load the program, AmigaDOS should safely exit with the
  19.       ever-so-intelligible "not an object module."
  20.  
  21.       We also all know that this doesn't always happen, or that the low memory
  22.       situation will cause problems elsewhere in the system.  The Amiga simply
  23.       doesn't like to be low on memory.
  24.  
  25.       Enough's uses include those "setup" types of files, where you
  26.           rez -l make cc ln as
  27.       or
  28.             run preview
  29.             run mg
  30.             tex -R
  31.       or the ever popular AmiCron, where you could run MRBackup every Monday
  32.       afternoon at 3:00, provided there's enough ram.
  33.  
  34.      EXAMPLE
  35.       Enough 200000 100000
  36.  
  37.       will test for the existance of 200000 bytes of ram, 100000 of which
  38.       must be chip ram.  If there is enough, enough will exit with a return
  39.       code of 0; if there isn't, it will exit with a return code of 10.
  40.       Very simple.  If you look at the source code, you'll see just how
  41.       simple.
  42.  
  43.       Two very simple examples are provided.  Launch is an execute script,
  44.       and launch.sh is a script for Matt Dillon's shell.
  45.  
  46.      AUTHOR
  47.       Eric Kennedy          ejkst@cisunix.edu
  48.  
  49.      BUGS
  50.       How could anything so short have bugs?
  51.  
  52.       Enough simply compares your requested amount with the amount in the
  53.       system, so it is up to you to provide your own safety margins.
  54.       Experiment first, using pm or shell or mclk, or some other utility that
  55.       provides seperate reports for fast, chip, and total.  Run your system
  56.       down do what you think the minimum is and see if there's a problem
  57.       running your application.
  58.