Re: memory allocation and virtual memory increase
Re: memory allocation and virtual memory increase
- Subject: Re: memory allocation and virtual memory increase
- From: Shawn Erickson <email@hidden>
- Date: Mon, 27 Nov 2006 22:27:08 -0800
On Nov 27, 2006, at 10:22 PM, Bruce Johnson wrote:
I'm trying to track down some memory issues, specifically virtual
memory issues.
My program contantly allocates (via malloc) chunks of memory to hold
computer generated data. It then writes the data out to disk via
fwrite. Then the memory is then freed.
When the application runs the physical memory usage stays constant and
do not increase and no leaks are detected. However, the virtual
memory size grows and grows until it crashes the application.
I found a similar problem here:
http://www.cocoabuilder.com/archive/message/cocoa/2006/10/24/173264
But I don't understand all the details. I don't use vm_allocate so I
shouldn't need vm_deallocate (like I would know how to use either)
The memory allocations and freeing are occuring inside of pthreads.
Any ideas where I could start to look to reduce the vm size?
It sure sounds like you have a memory leak in your application. You
should use vmmap, MallocDebug, etc. to understand what is leaking.
-Shawn
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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