[Bug 252858] calloc manual page has become useless

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Jan 22 14:31:44 UTC 2021


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252858

Conrad Meyer <cem at freebsd.org> changed:

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

--- Comment #1 from Conrad Meyer <cem at 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 memory
       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).

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


More information about the freebsd-doc mailing list