[Interest] memory fragmentation?

Adriano Rezende adriano.1.rezende at nokia.com
Thu Aug 23 16:06:35 CEST 2012

On 08/22/2012 07:27 PM, ext Jason H wrote:
> C++ on .NET functions as it does now, however the compiler introduces 
> the operator of ^ as a type modifier like * (pointer)
> ^ are handles to managed objects, as * are addresses of objects. The 
> runtime then handles dereferencing the handles for you. jsut like your 
> compiler uses the appropriate instructions with a pointer.
> Now, here's my crazy idea. If we have small objects - say Qt's 
> interface classes, and large objects, say Qt's private classes, then 
> could we do some d-ptr trickery where Qt can reallocate and copy/move 
> the memory around and reassign a d-ptr? We can't get all the coolness 
> of .NET's GC, but we can come close, at least for "large" objects 
> (objects using d-ptrs). We've already talked about the GUI, but what 
> is more interesting to me is a QObject hierarchy (not necessarily 
> QWidgets) in that you could say for this large, old tree of objects, 
> do something that would result in "better" (more contiguous) memory 
> allocations.

I'm wondering if you are really trying to solve a problem or you just 
want to .NETify Qt for the fun of it.
Many developers want to have full control on how and when their memory 
allocations/deallocations occurs. If you start to consider adding a GC 
into Qt, I think it's time to choose another technology.
As I said, if you are really facing fragmentation or performance 
problem, you can handle them in an ad hoc manner, according to your 

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

More information about the Interest mailing list