• 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
Re: How to split a big file ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to split a big file ?


  • Subject: Re: How to split a big file ?
  • From: Martin Wierschin <email@hidden>
  • Date: Mon, 20 Mar 2006 19:40:38 -0800

While mmap and the split command are good options to know about, there isn't any reason the standard Cocoa classes shouldn't work here. Glancing at your code there's only one thing I can think of:

	while (r=[R read:data maxLength:dec])
	{
		NSAutoreleasePool *pool=[[NSAutoreleasePool alloc] init];
	...
		[pool release];
	}

Perhaps the -read:maxLength: method is allocating autoreleased data? I don't see why it should, but try this:


	while( 1 ) {
		NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
		r = [R read:data maxLength:dec];
		if( 0 == r ) break;
		...
		[pool release];
	}

~Martin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: How to split a big file ?
      • From: John Stiles <email@hidden>
References: 
 >How to split a big file ? (From: MichaĆ«l Parrot <email@hidden>)

  • Prev by Date: Re: Non-Active Window Interaction
  • Next by Date: Re: NSTask and root permission
  • Previous by thread: Re: How to split a big file ?
  • Next by thread: Re: How to split a big file ?
  • Index(es):
    • Date
    • Thread