Re: [Pyobjc-dev] Initial memory usage
Brought to you by:
ronaldoussoren
From: Ronald O. <ron...@ma...> - 2009-09-30 19:47:30
|
On 30 Sep, 2009, at 20:32, Arif Amirani wrote: > Thanks for the info Bill. How do I figure out if the memory usage is > high due to allocations or mm stuff? I tried instruments but > couldn't make out what I was seeing. I'm looking with instruments as well, I'm using the basic TableModel example from pyobjc-framework-Cocoa to test. The bulk of memory usage is due to PyMem_Malloc, which is Python's memory allocator. Python has its own allocator build on top of malloc to get better performance (malloc()/free() are not fast enough on most platforms, and there's also a risk for memory fragmentation). The next question is: is the memory usage real, or is most of it just the memory arena's for PyMem_Malloc. To be continued, Ronald > > Thanks, > Arif > > On Wed, Sep 30, 2009 at 11:03 PM, Bill Bumgarner <bb...@ma...> wrote: > > On Sep 30, 2009, at 6:38 AM, Arif Amirani wrote: > > A small update. I tried the same with a Ruby Cocoa bridge and the > exact single window app started off with only 9M+ memory usage. I'll > try a few more tests but otherwise this looks like a huge difference > between native cocoa - ruby cocoa and pyobjc apps. > > Is it allocations or is it memory mapped gunk? > > If it is allocations, that is a problem. > > If it is memory mapped stuff -- shared libraries, etc -- you > shouldn't care. > > b.bum > > |