log in | register | forums
Show:
Go:
Forums
Username:

Password:

User accounts
Register new account
Forgot password
Forum stats
List of members
Search the forums

Advanced search
Recent discussions
- Elsear brings super-fast Networking to Risc PC/A7000/A7000+ (News:)
- Latest hardware upgrade from RISCOSbits (News:)
- RISCOSbits releases a new laptop solution (News:4)
- Announcing the TIB 2024 Advent Calendar (News:2)
- RISC OS London Show Report 2024 (News:1)
- Code GCC produces that makes you cry #12684 (Prog:39)
- Rougol November 2024 meeting on monday (News:)
- Drag'n'Drop 14i1 edition reviewed (News:)
- WROCC November 2024 talk o...ay - Andrew Rawnsley (ROD) (News:2)
- October 2024 News Summary (News:3)
Latest postings RSS Feeds
RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
 
View on Mastodon
@www.iconbar.com@rss-parrot.net
Site Search
 
Article archives
Acorn Arcade forums: Programming: heaps
 
  heaps
  Loris (13:14 15/5/2003)
  Phlamethrower (13:25 15/5/2003)
  john (14:14 15/5/2003)
 
Tony Haines Message #42123, posted by Loris at 13:14, 15/5/2003
madbanHa ha, me mine, mwahahahaha
Posts: 1025
Is it possible to fiddle around with the memory page allocation under RiscOS?
I'm wondering whether it would be possible to make some sort of heap which wouldn't fragment.
I don't think this is original, but basically the heap manager would fiddle with the physical to logical addressing lookup*, so you could create, release, grow and shrink multiple areas. Albeit only in multiples of the memory page size (4k I think).
I'm not claiming I'd be able to do it, just speculating.


*In a similar manner to how apps all think they start at &8000.
  ^[ Log in to reply ]
 
Jeffrey Lee Message #42127, posted by Phlamethrower at 13:25, 15/5/2003, in reply to message #42123
PhlamethrowerHot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot stuff

Posts: 15100
Yes it's possible, but I dunno how much RISC OS will like it if you tried doing it with application space in the WIMP (e.g. it'll move the pages back to their original locations on a task switch).

However you can get round this by creating a 'custom' dynamic area. This will essentially give you free reign over what the pages map to. I know of at least one program that does this; I think it was for virtual memory, but I can't remember what it was called. Also I don't have any docs on the dynamic area API :(
  ^[ Log in to reply ]
 
John D Message #42130, posted by john at 14:14, 15/5/2003, in reply to message #42123
Member
Posts: 261
Someone did this and made the module area like that, only worked on RO3.1 or earlier. You'd only be able to deallocate blocks of 4k or multiples. You can use OS_SetMemMapEntries or something to unmap pages IIRC. It'd work better for some patterns of memory allocation/deallocation than others, and you'd probably be better off writing your own heap management algorithm to try to free up 4K areas rather than conserve address space. Anyway, good luck if you do have a go.
  ^[ Log in to reply ]
 

Acorn Arcade forums: Programming: heaps