Is there a 1GB memory ceiling for vm_allocate?
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