jemalloc: Allow opting in for MADVISE_FREE

"MADV_FREE" is more powerful than "MADV_DONTNEED" which
is noticable in cases where there is high memory pressure.
Allowing Jemalloc to use "MADV_FREE" also enables
it to perform lazy page purging.

So, add an option to opt in to the usage
of "MADV_FREE" in jemalloc.
Targets which have "MADVISE_FREE" support
should always opt in by setting
"TARGET_SUPPORTS_MADVISE_FREE" to true
in order to benefit from lazy page
purging in jemalloc.

Change-Id: Ie7455fe9d24f710146ed64f6e5ad1debde60aae3
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
1 file changed