Re: Calling fopen() from a simple C++ program in Xcode 5.0.2 raises EXC_BAD_ACCESS, code=2
Re: Calling fopen() from a simple C++ program in Xcode 5.0.2 raises EXC_BAD_ACCESS, code=2
- Subject: Re: Calling fopen() from a simple C++ program in Xcode 5.0.2 raises EXC_BAD_ACCESS, code=2
- From: Ken Thomases <email@hidden>
- Date: Mon, 23 Dec 2013 23:45:57 -0600
On Dec 23, 2013, at 9:49 PM, Dan Korn wrote: const size_t inBufferSize = 10000000; // about 10 MB
char buffer[inBufferSize];
The default stack size is 8MB. Your "buffer" variable exceeds that. I suspect that's the problem. Don't put such large buffers on the stack. Allocate them on the heap.
Regards, Ken
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden