I'm working on an app that uses the Video Toolbox for 264 decoding and uses OpenGL for presentation of the frames. Most of the time, everything works fine. But occassionally, the app will get killed for being out of memory. Watching the app in Instruments, it's pretty clear that the memory usage of the app itself is fine (around 10MB, pretty consistently). In fact, everything looks fine up until everything being jetisoned. In the crash log, the app itself looks okay memory wise (still around 10MB), but mediaserverd has jumped from it's normal 5-6MB of RAM to almost 100MB. According to the report, it has the largest footprint in memory. If I then reconnect Instruments afterwards, mediaserverd has dropped back down to it's normal 5-6MB range again.
So what I'm wondering is this -- is there some connection between my usage of Video Toolbox, OpenGL or some other API and the memory usage in mediaserverd? Is there some error condition that I might not be handling correctly that would lead to something like this? What tasks does mediaserverd actually handle on the system?