• 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: FxPlug memory allocation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FxPlug memory allocation


  • Subject: Re: FxPlug memory allocation
  • From: Peter Litwinowicz <email@hidden>
  • Date: Thu, 05 Jul 2007 16:07:50 -0700
  • Thread-topic: FxPlug memory allocation

Title: Re: FxPlug memory allocation
> Let me correct myself...
>
> There's really no reason to allocate non-image memory as FxBitmaps.  
> That would just complicate your code, and would ultimately call malloc
> () anyway.

Garrick: I asked about this a few months ago and was told by Paul on the FCP team (Paul I hope you don’t mind me reposting this).  Don’t know ramifications for Motion, but I assume you should also use malloc there.
Pete


Hi, Pete,

Final Cut does cache frames aggressively, and we are smart enough to free up the cache if we need some extra RAM.  We also try to keep certain chunks of memory paged in at performance-critical times, to avoid swapping.  If a plugin allocates a bunch of memory directly from the OS, it defeats our tracking, and this is an issue with FxPlugs today.  Certainly with long projects and HD footage, it's pretty easy to exhaust our 2 GB address space, so memory management would still be helpful to us.  But it's not in FxPlug at the moment.

As far as our AE support goes, PF_NEW_HANDLE and friends actually do seem to call through to the OS and bypass our memory management.  So, it looks like you're not any worse off with FxPlug.  One big exception to this is that in AE, the host allocates image buffers, while in FxPlug you do it yourself.  Our implementation of PF_NEW_WORLD does go through our memory tracking, and is smart enough to free up some cache if the initial allocation fails.  I imagine that image buffers represent the majority of the allocations that most plugins make; in that case, the AE support might have the upper hand here.

Certainly, tighter integration with the host's memory management would be quite beneficial to FxPlugs.  But it's not in there yet.

- Paul
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: FxPlug memory allocation (From: Dave Howell <email@hidden>)

  • Prev by Date: Re: 16 bit float in Motion software path
  • Next by Date: Re: 16 bit float in Motion software path
  • Previous by thread: Re: FxPlug memory allocation
  • Next by thread: XML import of anamorphic clips broken in FCP6.0.1
  • Index(es):
    • Date
    • Thread