Using Virtual Memory On Xbox
Posted 19 February 2011 - 07:03 AM
I understand that virtual memory doesn't work like physical memory, and I already understand how to use VirtualAlloc/Free, but what addresses do you read/write to exactly? On my debug Xbox, it says that I have a total of 2GB of virtual memory to work with, and it hardly gets used (only about 8MB max on average), and I'd like to use it to my advantage so that non-immediately used data won't hog up the physical RAM. So would I just choose any address after the first 64MB in the 4GB address space? If so, do you have to manage the addresses allocated yourself? I noticed that there's no Map/UnmapViewOfFile functions on Xbox, so I thought I'd ask. Thanks.
Posted 24 February 2011 - 12:21 PM
Other than keeping track of how many chunks of memory you've allocated (in order to prevent memory leaks) you don't need to keep track of it. The kernel does that for you. Virtual Memory can be accessed just like physical memory. In fact, a game usually only reads/writes into virtual memory. The only reason for a game to write to Physical memory would be some special interaction with the XBOX hardware.
Posted 09 March 2011 - 05:39 AM
StepMania and MAMEoX both have their own implementation of a virtual memory manager which allows paging to disk. There was talk of adding it to XBMC, but I don't think that ever materialized.
Surreal64 also uses paging, but it's very tailored to the app. I'm not sure how they compare against each other performance wise yet, but would like to know.
Virtual Memory Allocation On The Xbox, Problems while allocating ram.
Why Does The Emulator Have To Load The Whole Rom?, Still pondering this 64MB thing...
A "possible" Solution To Ram Shortages...., ...Possible....
I think there's an SDK project that touches on this also:
\Microsoft Xbox SDK\Samples\Xbox\Misc\CustomMemoryAllocator
Undecided atm :/.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users