[Interest] memory fragmentation?

André Somers andre at familiesomers.nl
Thu Aug 23 11:18:09 CEST 2012

Hi Tony,

Just going to try to see how far this can be pushed. Disclaimer: my 
knowledge of the black arts of memory management is limited...

Op 23-8-2012 3:54, Tony Rietwyk schreef:
> Hi Jason,
> If there are 5 public objects whose d-pointers reference the same 
> private object address, how are you going to update them when you 
> relocate the private object?
> I don't think .Net stores addresses, just handles, so the relocate 
> only needs to update the handle info.   That's why you have to go 
> through all of the marshalling crap when you do want to pass the 
> address somewhere!
Couldn't that be solved by making d-pointers not MyClassPrivate* but 
MyClassPrivate**? Then, you'd only need to update one address...

I do think the idea is really crazy, but that does not mean that it 
isn't interesting anyway. I guess you'd need your own allocator for the 
objects as well. How else are you going to keep track of the actual 
fragmentation? To complicate it even more: the program could even 
'learn' between runs by keeping some stats between runs on memory usage, 
to influence its own memory allocation strategies... And yes, I 
understand that such things would be *very* complicated to do well, and 
might not even work properly.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120823/d942cb92/attachment.html>

More information about the Interest mailing list