[Qt-interest] pls
Mukesh Gopalakrishnan
mukgol at gmail.com
Wed Mar 31 22:09:57 CEST 2010
Dear Sir,
It exists a free memory proggram that frees RAM. WHen I read QT source.
There too many memory leaks in QT-source.
My QT program hangs if I run for one or two week because there is memory
leaks!!!!! BUT I can free the memory 98% it is wunderfulll! Here is how it
works
#include <stdio.h>
main(int argc, char **argv) {
unsigned long int i,k=0, max;
char *p;
if (argc>1)
max=atol(argv[1]);
else
max=0xffffffff;
printf("Freeing %lu kB ram\n",max);
while (((p=(char *)malloc(1048576))!=NULL) && (k+1024<=max)) {
for (i=0;i<256;p[4096*i++]=0);
k+=1024;
fprintf(stderr,"\r%d kB allocated",k);
}
while (((p=(char *)malloc(65536))!=NULL) && (k+64<=max)) {
for (i=0;i<16;p[4096*i++]=0);
k+=64;
fprintf(stderr,"\r%d kB allocated",k);
}
while (((p=(char *)malloc(1024))!=NULL) && (k+1<=max)) {
for (i=0;i<16;p[64*i++]=0);
k+=1;
fprintf(stderr,"\r%d kB allocated",k);
}
fprintf(stderr,"\nMemory freed.\n");
exit(0);
}
please try right away and give an asnwer ASAP\
Muk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100331/37b5763f/attachment.html
More information about the Qt-interest-old
mailing list