DEV Community

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

 
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?