C Language and Libraries Help (clang.hlp) (Table of Contents; Topic list)
calloc Functions
 Summary Example                         Up Contents Index Back
─────Run-Time Library───────────────────────────────────────────────────────
 
     The calloc family of functions allocates storage space for an
     array of <num> elements, each <size> bytes in length. Each element
     is initialized to 0.
 
     In large data models (compact-, large-, and huge-model programs),
     calloc maps to _fcalloc. In small data models (tiny-, small-, and
     medium-model programs), calloc maps to _ncalloc.
 
     The various calloc functions allocate storage space in the data
     segments shown in the list below:
 
     Function     Heap Segment
 
     calloc       Depends on data model of program
     _bcalloc     Based heap, specified by <seg> segment selector
     _fcalloc     Far heap (outside default data segment)
     _ncalloc     Near heap (inside default data segment)
 
     Return Value
 
     The calloc functions return a pointer to the allocated space. The
     storage space pointed to by the return value is guaranteed to be
     suitably aligned for storage of any type of object. To get a
     pointer to a type other than void, use a type cast on the return
     value.
 
     The _fcalloc and _ncalloc functions return NULL if there is
     insufficient memory available. The _bcalloc function returns
     _NULLOFF in this case.
                                    -♦-