home *** CD-ROM | disk | FTP | other *** search
/ Fujiology Archive / fujiology_archive_v1_0.iso / !MAGS / !BONUS / COVERDSK / STFORMAT / STF27.ZIP / STF27.MSA / SHOMEM_SHOWMEM4.TXT < prev    next >
Text File  |  1987-04-21  |  5KB  |  112 lines

  1.  
  2.         *******************************************************
  3.         *                                                     *
  4.         *  ShowMem4 - The Displayer - runs as .PRG _or_ .ACC  *
  5.         *  Copyright 1988 John Eidsvoog                       *
  6.         *  Revision date: Saturday, June 22, 1991             *
  7.         *                                                     *
  8.         *******************************************************
  9.  
  10.         This program is Freeware.  It may not be sold or distributed
  11.         commercially without my written permission.  You may freely
  12.         distribute it otherwise as long as the files are included in
  13.         their entirety with no modifications. 
  14.  
  15.         Included files:
  16.  
  17.           SHOWMEM4.PRG The Program/Accessory
  18.           SHOWMEM4.TXT This text file
  19.  
  20.  
  21. ShowMem4 1.4 Fixes Problem
  22. --------------------------
  23.  
  24. ShowMem4 now works correctly on TOS 1.4 and later.  Previously you may
  25. have had to run it twice in order to display a valid listing or it may
  26. have even crashed upon running the first time. 
  27.  
  28.  
  29. Fast RAM Support
  30. ----------------
  31.  
  32. ShowMem4 now recognized memory blocks in "fast RAM", either on the TT030
  33. or any other computer implementing "fast RAM".  The start address of
  34. memory blocks in fast RAM will be displayed in inverse text. 
  35.  
  36.  
  37. -----------------------------------------------------------------------
  38.  
  39.  
  40. About ShowMem4
  41. --------------
  42.  
  43. ShowMem4 is specially written so that it can be run as either an
  44. accessory _or_ a program.  All you have to do is change the name (using
  45. Show Info) so that the extension (last three letters) is .ACC for an
  46. accessory, or .PRG for a program.
  47.  
  48. ShowMem4 allows you to examine the GEMDOS memory descriptor lists.  The
  49. locations of these lists in memory is not documented by Atari.  There is
  50. a search routine that should find these lists in all ROM versions
  51. (including future ones).  If this search should fail, you will be
  52. alerted that this is an unknown ROM. 
  53.  
  54. You may list the information to the screen or to a printer.  This is
  55. selected from the initial alert box.  The listing will include all
  56. allocated memory blocks, followed by all memory free blocks.  If you
  57. hold down the 'Alternate' key when you select the output device, you
  58. will also get the memory descriptor waiting list (this is my name for it
  59. as until recently its very existence was undocumented).  It is now
  60. documented as _root, or a pointer to the OS pool, although the TOS 1.4+
  61. ROMs seems to contain a pointer to a null.  When GEMDOS splits a block
  62. into two smaller blocks, it uses this list to get a new descriptor
  63. location.  When two contiguous blocks are merged, the unused block is
  64. put back in this list.  For this reason, the entries in this list may or
  65. may not contain any useful information. 
  66.  
  67. The leftmost column will show the decimal size of each block as well as
  68. a total for each type of memory blocks.
  69.  
  70. While the listing is scrolling on the screen, you may pause/continue by
  71. using the mouse button. 
  72.  
  73. ------------------------------------------------------------------------
  74.  
  75. The structure of a memory descriptor is as follows:
  76.  
  77.         long  pointer to next descriptor in list or zero (end of list)
  78.         long  starting address of the block
  79.         long  number of bytes in block
  80.         long  pointer to base page of block's owner
  81.  
  82. (This information is not documented by Atari and you should not rely on
  83. its validity as they are free to change it at any time.)
  84.  
  85.  
  86. ------------------------------------------------------------------------
  87.  
  88.  
  89. One point that should be raised about free memory, is that when GEMDOS
  90. returns the bytes available via Malloc(-1), it returns the size of the
  91. largest available block, _not_ the total available memory.  ShowMem is
  92. the only tool (to my knowldege) for the ST that will show you the true
  93. total available memory. 
  94.  
  95. When a program runs, it is given the largest available memory block to
  96. run in.  But when a program requests a memory block from GEMDOS, it is
  97. given the smallest memory block that is large enough to fill the
  98. request.  This means that smaller, fragmented block may still be useful
  99. to many applications.  It may also be confusing to someone who is using
  100. a "regular" method of determining free memory. 
  101.  
  102. You might check free memory and be told that there is 800K free, while
  103. there might be a fragmented 33K block which is unseen.  Then you might
  104. tell a program to allocate a screen buffer of 32K.  Your free memory
  105. display will still show 800K because the 32K of the 33K block will be
  106. supplied as the screen buffer.  This whole scenario can be examined by
  107. using ShowMem.
  108.  
  109.  
  110. John Eidsvoog
  111. CodeHead Software
  112.