[GRASS-user] r.viewshed build
Adam Dershowitz, Ph.D., P.E.
adershowitz at exponent.com
Mon Oct 10 11:24:26 EDT 2011
On Oct 10, 2011, at 12:51 AM, Glynn Clements wrote:
> Adam Dershowitz, Ph.D., P.E. wrote:
>> I just tried to build and run r.viewshed. When I build it, it seems to
>> compile fine, but then latter in the make process, I saw this error go
>> MM error: limit =0B. allocating 16B. limit exceeded by 24B.
>> Assertion failed: (0), function operator new, file mm.cc, line 326.
>> Any thoughts or suggestions what might be going on with this?
> Something is trying to allocate memory before the memory manager
> object has been initialised.
> The order in which static objects are constructed is undefined. So if
> a static object dynamically allocates memory in its constructor, it's
> a matter of luck whether the memory manager object has been
> constructed at that point.
> Fortunately, the MM_register class doesn't actually need construction.
> Unfortunately, the limit-checking mode is statically initialised to
> "abort", then changed to "ignore" in the constructor.
> This has (hopefully) been fixed in 7.0 with r38702, but the problem
> remains in 6.x.
> The fix involves changing line 443 of lib/iostream/mm.cc from:
> MM_mode MM_register::register_new = MM_ABORT_ON_MEMORY_EXCEEDED;
> MM_mode MM_register::register_new = MM_IGNORE_MEMORY_EXCEEDED;
I assume that means 1) the only way to fix this is to recompile the grass iostream static library? (I have been using the binary of grass). 2) Will the same change work in 6.x? Or would the change potentially introduce other problems or be more complicated?
More information about the grass-user