[sudo-commits] sudo changeset 14113:803b4a82bedd
Todd C. Miller
Todd.Miller at sudo.ws
Mon Jul 25 16:11:32 MDT 2022
changeset: 14113:803b4a82bedd in /raid/repos/sudo
details: https://www.sudo.ws/repos/sudo/rev/803b4a82bedd
user: Todd C. Miller <Todd.Miller at sudo.ws>
date: Mon Jul 25 15:08:11 2022 -0600
Log Message:
Add sudo_mmap_{alloc,allocarrary,strdup,free} functions.
These allocate memory via mmap anonymous regions and store the mapped
size immediately before the returned pointer as an unsigned long.
They are intended to be used in cases where malloc(3) and free(3)
are unsuitable due to concerns about corrupting global state in
multi-threaded programs or signal handlers.
diffstat:
MANIFEST | 1 +
include/sudo_util.h | 10 +++
lib/util/Makefile.in | 18 +++++-
lib/util/mmap_alloc.c | 137 ++++++++++++++++++++++++++++++++++++++++++++++++++
lib/util/util.exp.in | 4 +
5 files changed, 166 insertions(+), 4 deletions(-)
More information about the sudo-commits
mailing list