site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=J967HJ8f1fncxT0OtqWHvWonu+AMWnOJifRvIi5uikVtU+d3Q55d2vFUICB1lMPmsw41x1UtzKpbzsssjl4SCPMvhSk9qnm69Kity4jlACi/Ca2bDeP7Rlu+kr2ywFJya409mnt2gICdrYCJ/cOqORkxrHxGIj/15elH4SjGPM8= I've done a little vm logging in my time too. I used mach_override [http://rentzsch.com/mach_override/] To catch calls to vm_allocate and vm_deallocate. These are the system calls that actually work behind the scenes of Mac OS X's malloc/free implementation mach_override will let you "hook into" all calls to vm_allocate/vm_deallocate and from there you can call the original function and add any sort of logging before and after the real function runs. The Mac OS X malloc implementation does a lot of "pooling" in that not all malloc calls are going to call vm_allocate and not all free calls are going to call vm_deallocate. If you do some experimentation you'll probably see this for yourself. Also the source is available to libSystem and its constituent parts. Dave On Wed, 02 Mar 2005 12:10:49 -0800, Michael Burbidge <mburbidg@adobe.com> wrote:
We have a very large application that uses a couple of dozen libraries from various sources. Our application is leaking virtual memory. Periodically, there is a 1 Mb bump in virtual memory, which is never reclaimed. Over time, several days, the accumulative affects of this leak are that we run out of virtual memory. We've tried all the standard tools such as leaks, and MallocDebug, but our application is too large for these. They either crash or slow our application down to the point that it is useless.
I'm wondering if there is someway for me to get my hooks into the system allocator. If so, everytime I see a 1 Mb bump in virtual memory I could log the stack to a file. The stack may lead me to the leak.
Any suggestions would be appreciated.
Michael-
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/leimy2k%40gmail.com
This email sent to leimy2k@gmail.com
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com