Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jan 2021 14:31:44 +0000
From:      bugzilla-noreply@freebsd.org
To:        doc@FreeBSD.org
Subject:   [Bug 252858] calloc manual page has become useless
Message-ID:  <bug-252858-9-YDm1lDYlYm@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-252858-9@https.bugs.freebsd.org/bugzilla/>
References:  <bug-252858-9@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D252858

Conrad Meyer <cem@freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|New                         |Closed
         Resolution|---                         |Not A Bug

--- Comment #1 from Conrad Meyer <cem@freebsd.org> ---
jemalloc has been standard in FreeBSD for like, more than a decade?  This is
not new.  http://rapid-shield.com/releases/7.0R/relnotes.html

It's not quite a canonical manual page but it's not as poor as you make it =
out:

       The calloc() function allocates space for number objects, each size
       bytes in length. The result is identical to calling malloc() with an
       argument of number * size, with the exception that the allocated mem=
ory
       is explicitly initialized to zero bytes.

Ok, so it does what malloc does for zero byte requests:

       The malloc() function allocates size bytes of uninitialized memory. =
The
       allocated space is suitably aligned (after possible pointer coercion)
       for storage of any type of object.

Ok, so you can store any 0-byte object you want at the return value of
malloc(0).

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-252858-9-YDm1lDYlYm>