[GRASS-dev] r.terraflow broken

Laura Toma ltoma at bowdoin.edu
Mon Aug 3 16:46:23 EDT 2009


The problem is that it attempts to set the memory manager limit to  0   
(see below:  limit=0B), and the first line in
MM_register::set_memory_limit(size_t new_limit)

is

assert(new_limit>0).

Therefore the problem.
So the question is, why does it try to set  the memory limit to 0?
Unless the user specifies a value, the default value is 300MB,  see  
main.cc:

mem->answer="300";
...
opt->mem = atoi(mem->answer);
..
size_t mm_size = opt->mem << 20;    /* opt->mem is in MB */
MM_manager.set_memory_limit(mm_size);

Did you use the default value of memory, or a different one?
I wonder what size_t is on that platform.


-Laura


On Aug 3, 2009, at 2:47 PM, Markus Neteler wrote:

> Hi Laura,
>
> we have  new problem in GRASS 7 with r.terraflow:
>
> On Mon, Aug 3, 2009 at 8:40 PM, Glynn Clements<glynn at gclements.plus.com 
> > wrote:
>>
>> It appears to be related to memory management:
>>
>>        $ r.terraflow help
>>        MM error: limit =0B. allocating 24B. limit exceeded by 32B.
>>        r.terraflow: mm.cc:344: void* operator new(size_t):  
>> Assertion `0' failed.
>>        Aborted (core dumped)
>
> Happens at least on Gentoo (?) and Mandriva.
>
> But
> grass64/lib/iostream/mm.cc
> and
> grass70/lib/iostream/mm.cc
> look the same despite the commented header.
>
> Any idea?
>
> thanks
> Markus



More information about the grass-dev mailing list