[GRASS5] s.out.ascii memory leak
H Bowman
hamish_nospam at yahoo.com
Fri Apr 11 08:38:25 EDT 2003
On Thu, 10 Apr 2003 17:05:41 +0100
"Glynn Clements" <glynn.clements at virgin.net> wrote:
> > while we're at it, s.out.ascii's memory use is pretty terrible, and
> > grows out of control as well. The program is only a few lines long, so
> > maybe someone who knows the libraries better than I could spot it.
>
> - fprintf (stdout,"%s\n", G_site_format (site, fs, strip));
> + {
> + char *str = G_site_format (site, fs, strip);
> + fprintf (stdout,"%s\n", str);
> + G_free(str);
> + }
Yes, that patch works great. I can now output more than 8mb worth of points file.
Memory usage is now like 780kb and steady instead of 1gb and growing...
thanks,
Hamish
More information about the grass-dev
mailing list