Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 25 Feb 2021 12:19:42 -0800
From: enh <>
Subject: Re: Sized deallocation for C

(bionic maintainer here...)

"Two allocators (TCMalloc and jemalloc) expose this functionality under the
name sdallocx. The latter is the system allocator for a number of BSD
distributions; the extension is available under this name for the FreeBSD
and NetBSD libcs, and some versions of Bionic (the android libc)."

note that the part about bionic is incorrect. no version of Android that
used jemalloc[1] was built without a linker script explicitly declaring our
exports, so even though this was in jemalloc at the time Android used
jemalloc, it wasn't exported.

since current versions of Android use scudo rather than jemalloc, i passed
this on to the scudo folks. they said that they don't see a problem with
this, but make a similar point to that made by the musl maintainer --- we
can't rely on untrusted input for security.

so i think for Android this would provide neither performance nor security
benefits, but since it can trivially be implemented as a call to free(3) i
don't think it's a problem for us either.

1. Android originally used dlmalloc, but we switched to jemalloc for
performance reasons, and then to scudo for a better balance of
security/performance. Android Go still uses jemalloc because we haven't yet
tuned scudo for low-memory devices. the transition to jemalloc was similar,
but we did remove dlmalloc before adding scudo :-)

On Thu, Feb 25, 2021 at 10:59 AM David Goldblatt <>

> Attached please find a draft WG14 proposal for adding sized
> deallocation support to C (whose semantics parallel those of C++'s
> associated operator delete overloads, Rust's sized deallocation
> interface, etc.
> In doing some of the implementer polling, Florian Weimer suggested
> posting here. Any comments would be appreciated.
> David

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.