I have this code which is somewhat complicated and at one point during execution time the program breaks.
1 2 3 4 5 6 7 8 9
Breakpoint 1, RealWork::legendreNONrotatedAnalysis (this=0x7fffffffde06, NN=512, PhiBounds=0x643990)
at sphere_perspective.cpp:2337
2337 flatAreasArray = newdouble [ll+1];
(gdb) n
a.out: malloc.c:2395: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsignedlong) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsignedlong) old_end & (pagesize - 1)) == 0)' failed.
Program received signal SIGABRT, Aborted.
0x00007ffff71a2418 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
What does it mean?
That allocation statement works well in other routines. So, why does it fail here? It is true, in this routine I have a few very large allocations prior to this statement. Is this the reason?
OS is Ubuntu 16.04. The program is in C++. Compiler is g++ -std=c++14 ...