I switched to last Qt version (3.3.3) insofar as I saw in bugfix notes that a bug in 
QPainter was corrected. But memory leak still occurs. No idea? ;(

Cheers,

Sébastien

-----Message d'origine-----
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] la part
Envoyé : lundi 18 octobre 2004 19:01
À : [EMAIL PROTECTED]
Objet : RE: Memory leaks when lots of graphical operations? [Qt/X11
3.1.1]


I use a simple 'top' with a 1 second refresh time... I watch "SIZE" column... This 
seems to be a reliable value : it changes with global free memory and when global free 
memory reaches 0, application and X server crash! (this is the case on the target 
where no swap is defined).

In fact, I'm wondering if there would not be a problem of "memory holes" : in my app I 
have two threads (qt loop thread and "stress" thread) which alternatively 
create/deletes objects ; I suspect system has some difficulties to recognize freed 
memory.

Sébastien

-----Message d'origine-----
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] la part
de Robert Currey
Envoyé : lundi 18 octobre 2004 18:41
À : [EMAIL PROTECTED]
Objet : Re: Memory leaks when lots of graphical operations? [Qt/X11
3.1.1]


How are you determining "memory in use"?

does this also show "memory in use"?
#include <stdio.h>

int main(int argc, char** argv)
{
int a = atoi(argv[1]);
int i;
int j = 0;
void* b[a];
printf("starting loops\n");
{
    for (i=0; i<a; i++)
        b[i] = malloc(a);
    for (i=0; i<a; i++)
        free(b[i]);
    j++;
}
printf("ended loops\n");
sleep(10);
}

bash-2.04$ ./a.out 20000
After the "ended loops" is printed, this app has freed it's memory, but the
OS *might* not have reclaimed it (it *might* not do so till the pages
allocated are needed).

Rob

----- Original Message -----
From: "Sébastien ZINSIUS" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 18, 2004 9:27 AM
Subject: RE: Memory leaks when lots of graphical operations? [Qt/X11 3.1.1]


> I tried a memory leak finder (e.g. LeakTracer) and... nothing! Well, there
are still some in my code and Qt but total amount of leak is about 25KB (and
it's not repetitive memory leak : memory leak is the same wether I send many
requests or not), while memory took 25MB!
>
> Any idea to known what is finally making memory use grow if it's not my
code or Qt? Another memory leak finder?
>
> Thanks in anticipation!
>
> Cheers,
>
> Sébastien
>
> -----Message d'origine-----
> De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] la part
> de Mark Vojkovich
> Envoyé : vendredi 15 octobre 2004 19:44
> À : [EMAIL PROTECTED]
> Objet : RE: Memory leaks when lots of graphical operations? [Qt/X11
> 3.1.1]
>
>
> On Fri, 15 Oct 2004, [iso-8859-1] Sébastien ZINSIUS wrote:
>
> > the app's... I know it does not seem to be X server that has to be
blamed, but I'm convinced that my problem is linked to "graphical" side,
either in Qt or Xlib functions. I traced event creations and deletions (Qt
side ; as I have an external thread that stress GUI, I have to pass through
Qt custom events), and no events seem to be lost on the Qt side (all the
event destructors are called). On the other side, memory use is still
growing...
> >
> > Do you know if there was any major memory leak that has been found
recently or not in Xlib?
>
>     There are no leaks in that stuff.  You've got an app bug or Qt bug
> or something.  I recall one app that requested alot of X events but never
> actually took them off of the queue so they just piled up in the client.
>
> >
> > Is there a way to trace X operations?
>
>    There's no tracing feature in Xlib.
>
>
> Mark.
>
> >
> > Cheers,
> >
> > Sébastien
> >
> > -----Message d'origine-----
> > De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] la part
> > de Mark Vojkovich
> > Envoyé : jeudi 14 octobre 2004 19:50
> > À : [EMAIL PROTECTED]
> > Objet : Re: Memory leaks when lots of graphical operations? [Qt/X11
> > 3.1.1]
> >
> >
> >    It's the app's memory usage that climbs or the server's?
> >
> > Mark.
> >
> > On Thu, 14 Oct 2004, [iso-8859-1] Sébastien ZINSIUS wrote:
> >
> > > Hello!
> > >
> > > I'm currently developing a graphical application with Qt/X11 3.1.1.
This application does a lot of operations and I'm doing some robustness
tests... I have a test tool that can stimulate application and implies lot
of drawing. The target on which application has to run is a mobile computer
with a x86 compatible 133MHz CPU, 64 MB RAM and 256MB compactflash.
> > >
> > > My problem is that when frequency of update becomes to high, machine
seems not to be able to treat all the graphical updates (well, it's my
feeling...) and memory use (of application) climbs rapidely (according to
this frequency).
> > >
> > > I looked into Qt source code and tried to print some X dependant
informations, e.g. with XPending, and number of events that have to be dealt
by X server, seem to be the source of the problem.
> > >
> > > I tried this test on a faster machine (P4 2GHz 512MB) and problem
occurs also, but in very very strength conditions (2 thread running with a
1msec period and producing in each cycle about 100 operations).
> > >
> > > I thought that memory would be given back after the "stress period",
but I made the same test only on a 10 second period (stopping automatically
stressing thread), and memory seems to be lost for eternity... (no memory
use decrease followed)
> > >
> > > Do you have an idea why the memory use climbs? How could I solve this
problem?
> > >
> > > Thanks in anticipation!
> > >
> > > Cheers,
> > >
> > > Sébastien
> > >
> > > _______________________________________________
> > > Devel mailing list
> > > [EMAIL PROTECTED]
> > > http://XFree86.Org/mailman/listinfo/devel
> > >
> >
> > _______________________________________________
> > Devel mailing list
> > [EMAIL PROTECTED]
> > http://XFree86.Org/mailman/listinfo/devel
> >
> > _______________________________________________
> > Devel mailing list
> > [EMAIL PROTECTED]
> > http://XFree86.Org/mailman/listinfo/devel
> >
>
> _______________________________________________
> Devel mailing list
> [EMAIL PROTECTED]
> http://XFree86.Org/mailman/listinfo/devel
>
> _______________________________________________
> Devel mailing list
> [EMAIL PROTECTED]
> http://XFree86.Org/mailman/listinfo/devel
>

_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to