Skip to content

Instantly share code, notes, and snippets.

@haldean
Created May 3, 2015 18:30
Show Gist options
  • Save haldean/89a13ae3cc65638a3e5d to your computer and use it in GitHub Desktop.
Save haldean/89a13ae3cc65638a3e5d to your computer and use it in GitHub Desktop.
OpenBSD malloc gist
Allocation of a zero size object returns a pointer to a zero size object.
This zero size object is access protected, so any access to it will
generate an exception (SIGSEGV). Many zero-sized objects can be placed
consecutively in shared protected pages. The minimum size of the
protection on each object is suitably aligned and sized as previously
stated, but the protection may extend further depending on where in a
protected zone the object lands.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment