BOOTSTRAP (kutils) functions


LIBRARY ROUTINE

kcalloc - allocate memory and initialize it

LIBRARY CALL

kaddr kcalloc(
   size_t nelem,
   size_t elsize)

INPUT

OUTPUT

none

RETURN VALUE

The address of the allocated memory. NULL is returned if the allocation fails, or if either nelem or elsize are 0

DESCRIPTION

This macro calls calloc() to allocate the requested data. However, it checks nelem and elsize to make sure both are greater than 0. If either parameter is 0, then NULL is returned.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

none

MODIFICATION

Converted from kcalloc in Khoros 1.0 (SJ)

FILES

$BOOTSTRAP/objects/library/kutils/src/memory.c

SEE ALSO

kutils(3)

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.