• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Calling fopen() from a simple C++ program in Xcode 5.0.2 raises EXC_BAD_ACCESS, code=2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Calling fopen() from a simple C++ program in Xcode 5.0.2 raises EXC_BAD_ACCESS, code=2
      • From: Dan Korn <email@hidden>
References: 
 >Calling fopen() from a simple C++ program in Xcode 5.0.2 raises EXC_BAD_ACCESS, code=2 (From: Dan Korn <email@hidden>)

  • Prev by Date: Calling fopen() from a simple C++ program in Xcode 5.0.2 raises EXC_BAD_ACCESS, code=2
  • Next by Date: Re: Calling fopen() from a simple C++ program in Xcode 5.0.2 raises EXC_BAD_ACCESS, code=2
  • Previous by thread: Calling fopen() from a simple C++ program in Xcode 5.0.2 raises EXC_BAD_ACCESS, code=2
  • Next by thread: Re: Calling fopen() from a simple C++ program in Xcode 5.0.2 raises EXC_BAD_ACCESS, code=2
  • Index(es):
    • Date
    • Thread