?? calloc.c
字號(hào):
#ifdef MALLOC_PROVIDEDint _dummy_calloc = 1;#else/*FUNCTION<<calloc>>---allocate space for arraysINDEX callocINDEX _calloc_rANSI_SYNOPSIS #include <stdlib.h> void *calloc(size_t <[n]>, size_t <[s]>); void *calloc_r(void *<[reent]>, size_t <n>, <size_t> <[s]>); TRAD_SYNOPSIS #include <stdlib.h> char *calloc(<[n]>, <[s]>) size_t <[n]>, <[s]>; char *_calloc_r(<[reent]>, <[n]>, <[s]>) char *<[reent]>; size_t <[n]>; size_t <[s]>;DESCRIPTIONUse <<calloc>> to request a block of memory sufficient to hold anarray of <[n]> elements, each of which has size <[s]>.The memory allocated by <<calloc>> comes out of the same memory poolused by <<malloc>>, but the memory block is initialized to all zerobytes. (To avoid the overhead of initializing the space, use<<malloc>> instead.)The alternate function <<_calloc_r>> is reentrant.The extra argument <[reent]> is a pointer to a reentrancy structure.RETURNSIf successful, a pointer to the newly allocated space.If unsuccessful, <<NULL>>.PORTABILITY<<calloc>> is ANSI.Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,<<lseek>>, <<read>>, <<sbrk>>, <<write>>.*/#include <string.h>#include <stdlib.h>#ifndef _REENT_ONLY_PTR_DEFUN (calloc, (n, size), size_t n _AND size_t size){ return _calloc_r (_REENT, n, size);}#endif#endif /* MALLOC_PROVIDED */
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -