A different kind of Walter? :-)

Lionello Lunesu lionello at lunesu.remove.com
Sun Apr 22 00:11:15 PDT 2007


"Dan" <murpsoft at hotmail.com> wrote in message 
news:f0di8h$q2e$1 at digitalmars.com...
> Dan Wrote:
>
>> Lionello Lunesu Wrote:
>> > Isn't this what's happening already?
>>
>> Not arbitrarily sized ones.  If you have a buffer like so:
>>
>> [slice0,slice1,slice2] = virtual address table
>> [minemineminemine][7Mb][minemineminemine][24b][minemine] = data buffer
>>
>> Iterate through your virtual array, and you're going to get a hit on the 
>> virtual address table, then on slice0, then on slice1 which will also 
>> load the 24b segment and probably slice2 for you.
>
> On another note, this is done by the x86 system already for memory pages 
> (4kb fixed block size).  If you need a 32kb array, you can take 8 pages 
> from anywhere in memory and call it yours, and iterate through the array 
> and it'll translate the address for you in the hardware via the "virtual 
> memory" process.
>

Well, that was *exactly* what I was getting at! OK, granted, it's only done 
in 4KB increments, but that's when a regular array resize (copying the 
contents over to a new place) would actually start harming performance.

L.





More information about the Digitalmars-d mailing list