I'm new to the forums so if this should be posted in a different category, let me know.
I have a program that uses a dynamic queue to store some data, and occasionally has to delete this queue and rebuild it. The problem is, if the queue is large when it tries to delete the program will get a segmentation fault, but if it's slightly smaller it works fine.
To debug I basically just reduced the code to a list that pushes a set number of nodes to the back and then deletes. If the number of nodes is >= 130274, the program crashes. If the number of nudes is <= 130273, it works fine. I also tried changing the size of the nodes by adding in a bunch of doubles as data members, but it still crashes at exactly the same number of nodes.
I also ran the .exe on someone else's machine and it did the same thing. However, I did not try compiling on someone else's machine yet.
I'm using Windows 8 with Emacs. There's plenty of processing power and RAM.