memory management - Does mlock prevent the page from appearing in a core dump? -


i have process sensitive memory must never written disk.

i have requirement need core dumps satisfy first-time data capture requirements of client.

does locking page using mlock() prevent page appearing in core dump?

note, embedded system , don't have swap space.

taken man 2 madvise:

the madvise() system call advises kernel how handle paging input/output in address range beginning @ address addr , size length bytes. allows application tell kernel how expects use mapped or shared memory areas, kernel can choose appropriate read-ahead , caching techniques. call not influence semantics of application (except in case of madv_dontneed), may influence performance. kernel free ignore advice.

particularly check option madv_dontdump :

exclude core dump pages in range specified addr , length. useful in applications have large areas of memory known not useful in core dump. effect of madv_dontdump takes precedence on bit mask set via /proc/pid/coredump_filter file (see core(5)).


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -