[GRASS5] [bug #4301] (grass) r.cost: cleanup temp files on abnormal exit; auto-segmentation

this bug's URL: http://intevation.de/rt/webrt?serial_num=4301
-------------------------------------------------------------------------

Subject: r.cost: cleanup temp files on abnormal exit; auto-segmentation

[cribbed from closed bug 3514,3741,4244]

r.cost can make lots of big temp files. We should catch ^C etc &
remove them. In about 10 minutes I just made 12gig worth....

also

"top" reports r.cost is using 1948mb ram for a region this big, with
seg=50% and 90k start points. :confused: going into swap makes me sad.
If I try seg=100% then G_malloc() gives an out of memory error right
at the start, which is nice.

Auto segmentation by 1/2 & retry if G_malloc() gives out of memory error?

Hamish

-------------------------------------------- Managed by Request Tracker