Re: appendBytes memcpy
Re: appendBytes memcpy
- Subject: Re: appendBytes memcpy
- From: "roger casaliƱas" <email@hidden>
- Date: Thu, 2 Aug 2007 13:58:39 +0800
largest single allocation? when you say single, do you mean one
NSMutableData object?
I put a debug tracker on the length of the NSMutableData object and the
largest value it got to before crashing is 745316412. Is that +-745MB?
Is there a way to remove used bytes from the earlier part of the buffer (the
bytes that were appended earlier)? It's not possible for me to release the
buffer since another thread is reading off of the buffer in a slow pace. I
was wondering if the reader can take off the bytes it has read (so the
buffer wont reach near a GB that fast)?
Additional info on the problem: it _ALSO_ happens on PPC. sorry, tester's
bad. hihi.
Thanks,
Roger
On 8/1/07, Shawn Erickson <> wrote:
>
>
> On Jul 31, 2007, at 11:46 PM, roger casaliƱas wrote:
>
> > I think the error is happening because we have exceeded the
> > capacity of
> > NSMutableData. It's just a guess.
> >
> > Is there a way to get the capacity of NSConcreteMutableData or it's
> > superclasses?
>
> They are only limited by your address space and by the 32 bit value
> used to specify byte count (ignoring 64b version). In a typical
> application you can allocate up to around 3 GiB worth of memory since
> you virtual memory space is used to hold shared mappings of the Cocoa
> framework, etc. and has a few reserved ranges. The largest single
> allocation is around 2 GiB but can be less if you have fragmented
> your virtual space.
>
> Note all of this is not affect by how much physical RAM you have in
> your system... since you never directly see that yourself, only
> virtual RAM addresses.
>
> -Shawn
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden