A different kind of Walter? :-)

David B. Held dheld at codelogicconsulting.com
Fri Apr 20 00:34:22 PDT 2007


Sean Kelly wrote:
> Lionello Lunesu wrote:
>> [...]
>> I wish there were a function like VirtualRealloc that would grow a 
>> memory block without EVER having to physically move the data.
>>
>> (That doesn't exist in Win32, does it?)
> 
> I don't think so.  If you have some data whose logical address range is 
> bounded by other data, I don't think it would be possible for it to grow 
> without being moved.

Well, there's at least two solutions to this.  One is to use infinite 
memory, in which case you can allocate at addresses that are infinitely 
far apart, allowing for unlimited growth in data structures.

The second is to use quantum superposition to allow storage of distinct 
data at the same location.  The trick is getting the state to collapse 
in a way that makes all the data recoverable, which is nothing more than 
an engineering detail, really.  We should get an intern to work on these 
projects over the summer.

Dave



More information about the Digitalmars-d mailing list