Re: Maximum size of an NSMutableData object?
Re: Maximum size of an NSMutableData object?
- Subject: Re: Maximum size of an NSMutableData object?
- From: Phill Kelley <email@hidden>
- Date: Thu, 5 Dec 2002 12:47:59 +1100
>
On Tuesday, December 3, 2002, at 18:57 , Dietrich Epp wrote:
>
>
> Does anyone know whether one gigabyte (1073741824) is an absolute Mac OS
>
> X-wide limit for the size of an NSMutableData object or if the limit is
>
> dependent upon the amount of physical RAM I have installed?
>
>
>
It would remain.
>
>
Notice that the exception is in the NSConcreteMutableData class, not
>
'malloc'. But it *is* absurd to try and allocate such large contiguous
>
regions on a 32-bit system. Precisely what you intend to do with a
>
gigabyte of memory I do not wish to know, but either wait for the G5 and
>
OS 11 or cache data on disk.
As it happens, I stumbled across this limit due to a coding error. I was
trying to allocate a 2MB object but, like a certain stockbroker of recent
fame, I managed to make an error of similar, albeit binary, magnitude
(blush!).
I became sufficiently intrigued by the phenomenon to want to track down the
precise point where the "absurd" message arose. All my Macs have 512MB RAM
and the limit being twice that seemed a little too convenient. Rather than
start pulling/adding DIMMs, I simply thought I'd ask and file the answer
away against the day when I might start to think that a >=1GB object wasn't
all that unusual.
After all, people of far greater renown than me have been known to posit
that 640K is more than anyone would ever need...
Regards, PK
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.