BOOTSTRAP (kutils) functions


LIBRARY ROUTINE

kmalloc - allocate a contiguous piece of memory

LIBRARY CALL

kaddr kmalloc(
   size_t size)

INPUT

OUTPUT

none

RETURN VALUE

a pointer to malloc'ed data on success, or NULL on size 0 or malloc failure

DESCRIPTION

Calls malloc() to allocate the requested data. However, it checks to make sure the size parameter is greater then zero. If the size paramter is 0, it returns NULL.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

none

MODIFICATION

Converted from kmalloc 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.