c++ - What does this memory map mean when I compile my program? -


i using ubuntu lucid lynx, use kate code c++ programs , use g++ compile them. writing genetic algorithm program , works fine except memory map 80% of time execute program. cannot figure out memory map means or how solve it. here output:

*** glibc detected *** ./main: double free or corruption (!prev): 0x0881fdc8 *** ======= backtrace: ========= [0x80da7f8] [0x80dec69] [0x80a5441] [0x80a546d] [0x8059227] [0x8058b2f] [0x8058f41] [0x80567ec] [0x80c075f] [0x8048191] ======= memory map: ======== 00149000-0014a000 r-xp 00000000 00:00 0          [vdso] 08048000-08165000 r-xp 00000000 08:02 2101716    /home/armandmaree/desktop/projek_fase2 (copy)/main 08166000-08168000 rw-p 0011d000 08:02 2101716    /home/armandmaree/desktop/projek_fase2 (copy)/main 08168000-08170000 rw-p 00000000 00:00 0  09a45000-09a67000 rw-p 00000000 00:00 0          [heap] b7600000-b7621000 rw-p 00000000 00:00 0  b7621000-b7700000 ---p 00000000 00:00 0  b77e2000-b77e3000 rw-p 00000000 00:00 0  bfc35000-bfc4a000 rw-p 00000000 00:00 0          [stack] aborted 

if know how can figure out problem lies or @ least explain me memory map means, great. in advance.

the memory map telling process crashed. [backtrace:] part tells stack trace (which function called function) when crash happened. memory map telling data @ addresses in process.

like others suggested in comments, compile -g , run program under debugger (gdb) better information. since crash caused heap corruption, using valgrind tool because specializes in type of problem.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -