A different kind of Walter? :-)

Sean Kelly sean at f4.ca
Fri Apr 20 12:00:59 PDT 2007


Dan wrote:
> Sean Kelly Wrote:
>> Lionello Lunesu wrote:
>>> I don't care if there address changes, just as long as there's no data being 
>>> copied physically. I mean, a block of continuous memory might already be 
>>> all-over-the-place in physical memory. That's what I want: a VirtualRealloc 
>>> that returns the address of a new virtual memory block, but which is using 
>>> the same physical memory.. 'Free' array resizes, surely this is worth 
>>> something!
>> Hm, assuming there is nothing else of the page(s) but the data to move, 
>> it should be possible to do so without explicit copying.  I have no idea 
>> is VirtualAlloc can do this, but it's definitely possible.
> 
> Oh my!
> 
> On the x86, this sort of implementation would slaughter your performance, as you'd get massive numbers of cache and page misses.
> 
> You could theoretically implement a system on the x86 that would virtualize memory locations arbitrarily, but.... ewww...

Yeah.  I was thinking that the way to do this would be in the virtual 
memory manager.  When the pages are moved the page table is updated, etc.


Sean



More information about the Digitalmars-d mailing list