DEV Community

Discussion on: I'm an Expert in Memory Management & Segfaults, Ask Me Anything!

Collapse
 
iggy12345 profile image
Aaron Jencks

I'll try and see if I can get it to finish, the segfault seems to happen at 18mil final board states, and at 3mil/sec it takes about an hour and a half to get there, but with valgrind... I'm an hour past 1 day and I'm still only at 3mil boards

Thread Thread
 
codemouse92 profile image
Jason C. McDonald • Edited

Although it's an early (and wild) guess, if the segfault occurs with a large set of data, but not a small set, I would suspect a buffer overrun may be the cause of your problems. Are you...

(1) Putting too much on the stack (versus dynamically allocating the space you need), or
(2) Exceeding the space you allocated?