• 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: displaying huge log files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: displaying huge log files


  • Subject: Re: displaying huge log files
  • From: Benjamin Stiglitz <email@hidden>
  • Date: Mon, 1 Dec 2008 14:29:01 -0500
  • Mail-followup-to: email@hidden

On Sun, Nov 30, 2008 at 12:48:26AM -0800, Andrew Farmer wrote:
> On 29 Nov 08, at 14:23, Nick Zitzmann wrote:
>> On Nov 29, 2008, at 5:39 AM, Mudi Dandan wrote:
>>> Is it possible to to display a memory mapped file in an NSTextView
>>
>> Of course.
>
> With one caveat: When creating a memory mapping (by using mmap), you
> have to specify the length of the region you want to map - so, if the
> file grows, you have to remap the file. Detecting this is up to you;
> kqueue may be useful in doing so. Also, if the file gets really large*,
> it may fail to map at all on 32-bit systems, as there's a limited amount
> of address space available.
>
> Unless you're absolutely sure that memory-mapping files is crucial to
> your application's performance, try just using standard file descriptors
> first. The performance difference isn't that huge, and there are a lot
> fewer caveats** involved.

If you want an example of how this mapping is done, check out the
sources for HexFiend:

<http://ridiculousfish.com/hexfiend/>

-Ben
_______________________________________________

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

  • Prev by Date: Textured Window Responder Issue
  • Next by Date: Re: Textured Window Responder Issue
  • Previous by thread: Re: Textured Window Responder Issue
  • Next by thread: Detecting SMB servers on the network
  • Index(es):
    • Date
    • Thread