[Qt-interest] Huge memory consumption

James Matta jamesmatta at gmail.com
Wed Jul 7 12:25:43 CEST 2010


A little more investigation leads me to refine my previous question, in fact
I am now pretty certain that it is not the fault of QFile at all.
I wrote a plugin to read the data. It allocates memory to store stuff it
reads and passes a pointer to the main program.
The main program receives this processes the data and then uses delete[] the
pointer.

So my new question is this: Is it possible to free memory in the main
program that was allocated in a plugin?
--
James Matta
University of Notre Dame
Physics Department

On Wed, Jul 7, 2010 at 6:00 AM, <qt-interest-request at trolltech.com> wrote:

> Send Qt-interest mailing list submissions to
>        qt-interest at trolltech.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://lists.trolltech.com/mailman/listinfo/qt-interest
> or, via email, send a message with subject or body 'help' to
>        qt-interest-request at trolltech.com
>
> You can reach the person managing the list at
>        qt-interest-owner at trolltech.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Qt-interest digest..."
>
> Today's Topics:
>
>   1. Qt 4.6.3 and Mingw compiler strange behaviour (Davide)
>   2. Sqlite&Model bug? (Jan)
>   3. Huge memory consumption (James Matta)
>
>
> ---------- Forwarded message ----------
> From: Davide <davide83 at gmail.com>
> To: qt-interest <qt-interest at trolltech.com>
> Date: Wed, 7 Jul 2010 11:07:40 +0200
> Subject: [Qt-interest] Qt 4.6.3 and Mingw compiler strange behaviour
> Hi all.
> I'm using Qt sdk Win opensource 2010.04.
> I'm observing a strange behaviour of the compiler and I don't understand
> the cause.
>
> When I modify a header file in my Qt project the g++ compiler doesn't
> recompile all the files that include it. If I want to correctly build the
> program I must clean the whole project each time (and this is very
> annoying).
>
> This seems to be a problem of the makefile that is generated by the qmake.
> I tried with different computers and different Qt versions but I got the
> same results.
>
> Did someone notice the same behavior? Is there a solution?
>
> Thanks
>   Davide
>
>
>
> ---------- Forwarded message ----------
> From: Jan <janusius at gmx.net>
> To: qt-interest <qt-interest at trolltech.com>
> Date: Wed, 07 Jul 2010 11:36:10 +0200
> Subject: [Qt-interest] Sqlite&Model bug?
> It seems, if stumbled across a bug. But I am not sure if it is the same I
> have already posted 6 month ago.
> Before I add this example to the bug report I would like to ask if anyone
> here using sqlite can confirm this. I have attached a little example. Maybe
> I have done something wrong.
>
> Updating the model does not work. I think this bug is more than just
> "somewhat important" because a DELETE/UPDATE RESTRICT
> is the default. Model/Views are unusable in this scenario, because after an
> (correctly) failing update of a cell the view/model wont accept correct
> updates any more.
>
> Qt Version is 4.6 (with qt's sqlite version).
>
> Jan
>
>
>
>
> ---------- Forwarded message ----------
> From: James Matta <jamesmatta at gmail.com>
> To: qt-interest at trolltech.com
> Date: Wed, 7 Jul 2010 05:42:53 -0400
> Subject: [Qt-interest] Huge memory consumption
> Hello all,
> I am using a QFile within to read a bunch of raw binary data. Each file is
> a couple gigabytes. When I am running the program on a test of a single file
> I notice the memory consumption climbs into a gigabyte of physical memory
> and a little less of virtual memory consumed.
>
> A cursory glance through my code does not reveal any immediately apparent
> memory leak. So I guess my question is this:
>
> Do I need to do something to the QFile as I read the data (I read 16kb
> chunks) to tell it not to use data that it had previously buffered? or do I
> need to go on a memory leak witch hunt with valgrind?
> --
> James Matta
> University of Notre Dame
> Physics Department
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100707/1ffdeab4/attachment.html 


More information about the Qt-interest-old mailing list