Re: large memory malloc
Re: large memory malloc
- Subject: Re: large memory malloc
- From: "Justin C. Walker" <email@hidden>
- Date: Thu, 30 Jun 2005 23:31:18 -0700
On Jun 30, 2005, at 17:47 , Mark Bessey wrote:
On Jun 30, 2005, at 5:32 PM, James E. Hopper wrote:
i have a simple xcode project that does a malloc that for the
latest data set has grown to just under 3gb. the malloc is
failing (on 10.3.9). since i have 4gb of ram and the docs imply i
can access up to 4gb space without having to go to 64 bit
addressing, i was hoping there was something simple i could do to
make this work?
There probably isn't anything simple you can do to solve the
problem without reworking your code, at least a little. While your
process has a 4GB address space, there is bound to be some
fragmentation of the available space, so the largest block you can
allocate will always be somewhat smaller.
FWIW, the 4GB limit is what 32 bits buys you. Your process's address
space comes with some pre-existing claims on some of that space:
- text (code)
- data
- stack
- shared libraries
The latter generally take a large chunk out of your space, and the
stack's space is not insignificant. I don't believe that you can
allocate memory in every corner of the "unclaimed" space in your
address space, but I am not the expert here.
In short, you can't get more than about 3GB of memory allocated as
you want it.
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large
Institute for General Semantics
--------
Some people have a mental horizon of radius zero, and
call it their point of view.
-- David Hilbert
--------
_______________________________________________
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