• 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
Is there a 1GB memory ceiling for vm_allocate?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is there a 1GB memory ceiling for vm_allocate?


  • Subject: Is there a 1GB memory ceiling for vm_allocate?
  • From: John Bullitt <email@hidden>
  • Date: Tue, 23 Jan 2007 16:57:38 -0500

Hi, folks.

I'm trying to push_back() a bunch of elements into a vector. When push-back() tries to allocate more than 1GB, it fails.

For example, the following little program will push_back() until it runs out of memory:

#include <vector>
int main (int argc, char * const argv[]) {
	std::vector<char> z;
	unsigned long int n;
	for (n=0;;n++) {
		z.push_back(0);
	}
}

I get an error like this: "malloc: *** vm_allocate(size=1073741824) failed (error code=3)" .

Why is it running out of memory so soon? My G5 has 5 GB of RAM and 175GB free disk space. I'm baffled.

Is there maybe an XCode setting that I missed that can increase VM size?

Thanks!

	John



---------------------------------------
	John Bullitt
	Earth ~ Sound ~ Light
	www.jtbullitt.com
	tel (USA):  617.629.2500 (GMT -5 hours)
---------------------------------------



_______________________________________________
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: Is there a 1GB memory ceiling for vm_allocate?
      • From: "Shawn Erickson" <email@hidden>
    • Re: Is there a 1GB memory ceiling for vm_allocate?
      • From: "Sean McBride" <email@hidden>
  • Prev by Date: Re: Objective-C++ now crashes (was "Objective-C exception handler
  • Next by Date: Re: gcc4 optimization problems on intel mac
  • Previous by thread: Re: Objective-C++ now crashes (was "Objective-C exception handler
  • Next by thread: Re: Is there a 1GB memory ceiling for vm_allocate?
  • Index(es):
    • Date
    • Thread