malt
                                
                                
                                
                                    malt copied to clipboard
                            
                            
                            
                        Per code line memory fragmentation at peak
Measure memory fragmentation at peak time or on an event based on signals.
We have the list for allocated segments, size, pointer and know the mmap list so we can compute how much we loose before and after each segment.
The real overhead is after or before but this is not strictly exact we can take average or before + after to just get an idea.
The nice thing is we can map on the related line.
I was thinking to also have a more correct analysis in post mortem with trace enabled but that can provide an intermediate way without going directly to traces.