On Fri, Feb 10, 2023 at 5:43 PM Rahul Gore (Nokia) <rahul.g...@nokia.com> wrote:
>
> I’m trying to find private and shared memory usage of each process in Linux. 
> ...

Application should _not_ share memory across processes. That's a
security vulnerability. One app could corrupt memory, and cause
unpredictable results in another process.

You can check for processes which share memory by looking for the
GNU_SHARED section attribute in a [on-disk] program. There should be
no shared sections.

Tobias Klein's checksec may show programs which have GNU_SHARED . If
checksec does not check for it, then `readelf -l <program> | grep
GNU_SHARED` should reveal it.

I'm guessing private memory usage is an easier problem. Profiling
tools probably provide it. Tools like 'perf mem' and Valgrind provide
the information.

Jeff

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to