home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / acorn / tech / 131 < prev    next >
Encoding:
Internet Message Format  |  1992-09-13  |  3.6 KB

  1. Path: sparky!uunet!mcsun!Germany.EU.net!news.netmbx.de!zrz.tu-berlin.de!math.fu-berlin.de!Sirius.dfn.de!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewsc!cbfsb!att-out!pacbell.com!decwrl!waikato.ac.nz!comp.vuw.ac.nz!cavebbs!tornado!khantazi!banksie
  2. Newsgroups: comp.sys.acorn.tech
  3. Subject: Of the RMA and it's terminal weirdness.
  4. Message-ID: <2IGCrhj021n@khantazi.welly.gen.nz>
  5. From: banksie@khantazi.welly.gen.nz (Philip R. Banks)
  6. Date: Sun, 13 Sep 1992 02:09:42 +1200
  7. Reply-To: banks_p@kosmos.wcc.govt.nz
  8. Organization: My Arc.
  9. Lines: 56
  10.  
  11.    Could someone at Acorn please post to the net an explanation of the RMA's
  12. memory allocation system before I lynch my RO2 ROMs! I am getting behavior
  13. that is *very* odd and I'd like to know why it is occuring. To explain :-
  14.  
  15. I have coded a little module, DataStart, that uses my other DataSuite
  16. modules to handle playing a sample once and then removing it from memory
  17. (for startup sounds essentially). Because I want to let the machine keep
  18. booting whilst it is playing the sound I am holding the sample in the RMA
  19. during play.
  20.  
  21.    Now I want to prevent this sample block from being trapped in the RMA.
  22. So, thought I, if I write the code to claim a largish block of memory before
  23. claiming the RMA block for the sample and then freeing that block after
  24. loading the sample I should give the RMA sufficient free room *below* the
  25. sample to prevent it putting blocks above the sample block.
  26.  
  27.    Unfortunately it seems the RMA does not think in such a simplistic way.
  28. Even telling the code to claim 'free' spaces of 900K does not help even
  29. though the rest of my boot sequence only needs 256K of RMA memory extra. For
  30. some reason blocks get allocated *above* the sample thereby locking it's
  31. space into the RMA.
  32.  
  33.    Now to this behavior add the odd behavior an Extend Block OS_Module call
  34. exhibits when the extension size is zero bytes. You see for various reasons
  35. some code I am working on will be extending and shrinking RMA blocks a fair
  36. amount and I would like to force the RMA to locate these blocks as low as
  37. possible freeing up as much RMA ap is possible. Now I would have thought
  38. telling the RMA to extend the block by zero bytes would cause it to relocate
  39. the block, possibly lower. (and there would be certain circumstances when I
  40. would *know* that there was sufficient RMA free down lower in the RMA to do
  41. this.)
  42.  
  43.    Yet what appears to happen is that the RMA relocates the block *up*
  44. higher while *not* freeing the space the block originally occupied. Net
  45. result everytime you try the extension by zero trick more RMA gets trapped -
  46. marked as in use. Yet when the block is released the whole lot gets released
  47. in one go!?!
  48.  
  49.    All this seems to indicate that the RMA has some unusual memory
  50. allocation scheme almost like a 'binary buddies' system where the pattern of
  51. allocation/deallocation is not in a linear fashion from the bottom up. Could
  52. *somebody* please explain what this scheme is and what might be 'legal' ways
  53. to try and massage the RMA into behaving more sensibly?
  54.  
  55.    Post, email & courier snail will do nicely, preferrably posted if it is a
  56. definitive answer as I suspect other people would like to know what the RMA
  57. Manager is doing...
  58.  
  59.     Philip
  60.  
  61. --
  62. Philip R. Banks  Syntax: mail < banks_p@kosmos.wcc.govt.nz >            @@@@@/|
  63. Take a look around you at the world we've come to know,                 @@@@/#|
  64. Does it seem much more than a crazy circus show?                        @@@/##|
  65. Maybe from the madness something beautiful will grow....                @@/---|
  66.    ---The Artilleryman from Jeff Wayne's "War of the Worlds"            @/    |
  67.