This output from Instruments doesn't make a lot of sense to me...

This seems to show that a bunch of memory being allocated in... mach_vm_deallocate. That doesn't seem likely, so I have to assume I'm misreading the output? (This is on macOS.)

Post not yet marked as solved Up vote post of kithrup Down vote post of kithrup
596 views

Replies

Hi there, the Call Tree View in the Allocations instrument shows the amount of allocation aggregated by frame. You can double click on symbol name to open the source viewer. It will show the distribution of allocations between lines of code or between disassembly instruction when source code is unavailable.

195.01 MB of allocations in the mach_vm_deallocate frame doesn't look right. Please file a feedback at https://feedbackassistant.apple.com with trace file, code example, and steps to reproduce the issue. Then please post the feedback identifier here, which will make it easier for us to connect the two.

--

Anton

Ok, I created FB12959624 with the trace bundle attached.

Hi kithrup,

Thank you for the feedback.

libphtread in pthread_join deallocates part of previously allocated in pthread_create VM region to reuse for the next thread. Instruments consider the leftover as reallocated region and reports it in allocation aggregation. This reallocations shouldn't affect your application memory footprint.

That makes sense, but it also seems to make it difficult to tell where in a trace memory is being allocated -- we're trying to figure out why our memory footprint goes up by a lot in some cases, and this behaviour doesn't make Instruments particularly helpful in that regard, no?