Memory fragmentation in a 32-bit application
Memory fragmentation in a 32-bit application
- Subject: Memory fragmentation in a 32-bit application
- From: Mitchell J Laurren-Ring <email@hidden>
- Date: Mon, 19 Jul 2010 15:26:09 -0700
Hello:
I have a 32-bit application that can convert PDF files into Postscript
files. We have a customer that processes large batches (100+) of large
PDF files (10Mb+). That customer will often experience a crash when
our application attempts to allocate memory using malloc which fails
and returns nil. The crash occurs because we assert the nil but I'm
trying to understand why the failure is occurring.
First, I have debugged the problem at the customer site and noted that
when the crash occurred our application was not out of VM (we still
have around 3Gb available) and there was still tons (over 4Gb of the
8Gb installed) of physical memory available. The OS reports "malloc:
*** mmap(size=nnnnnnnn) failed (error code=12)" on the console and
presumably returns a nil for the malloc. I cannot confirm this because
the code that is being executed at the time is in a library for which
I do not have source. The failed allocations can range from 10Mb to
50Mb.
I have concluded that the failure is probably happening as result of
fragmentation in our VM space but I'm not sure how to confirm that.
Are there any tools that can be used to visualize an application's VM
space? I've used Instruments quite extensively but it has problems
with apps that use a lot of resources and I don't think it has the
ability that I seek.
-Mick
------
Mitchell J Laurren-Ring
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden