Skip to content

Archive

Memory Mapping

1 articles
Linux 23 Sep 2026 4 min read

MADV_DONTFORK Excludes Memory Ranges from Child Address Spaces

MADV_DONTFORK changes a specific part of Linux process creation: a mapping marked with this advice is not made available in the child created by fork(). The parent keeps the mapping. The child starts without that address range, so an address that was valid there in the parent is not automatically valid in the child. This is a semantic control over mapping inheritance, not a cache hint. It belongs to the Linux-specific madvise() operations whose effects can change memory behavior.