ADC Home > Reference Library > Reference > Mac OS X > Mac OS X Man Pages

 

This document is a Mac OS X manual page. Manual pages are a command-line technology for providing documentation. You can view these manual pages locally using the man(1) command. These manual pages come from many different sources, and thus, have a variety of writing styles.

For more information about the manual page format, see the manual page for manpages(5).



MALLOC_SIZE(3)           BSD Library Functions Manual           MALLOC_SIZE(3)

NAME
     malloc_good_size, malloc_size -- memory allocation information

SYNOPSIS
     #include <malloc/malloc.h>

     size_t
     malloc_good_size(size_t size);

     size_t
     malloc_size(const void *ptr);

DESCRIPTION
     The malloc_size() function returns the size of the memory block that backs the allocation pointed to by
     ptr.  The memory block size is always at least as large as the allocation it backs, and may be larger.

     The malloc_good_size() function rounds size up to a value that the allocator implementation can allo-cate allocate
     cate without adding any padding; it then returns that rounded-up value.

SEE ALSO
     malloc(3)

BSD                              May 23, 2006                              BSD

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.