如果你知道有一个,你能告诉我它的用途吗?如果不是,请这样说:) 谢谢。
签名: void * malloc(unsigned long size, struct malloc_type type, int flags);
例如。其他标志是...
M_ZERO
Causes the allocated memory to be set to all zeros.
M_WAITOK
Indicates that it is OK to wait for resources. If the request
cannot be immediately fulfilled, the current process is put to
sleep to wait for resources to be released by other processes.
The malloc(), realloc(), and reallocf() functions cannot return
NULL if M_WAITOK is specified.**
这是我困惑的根源
编辑:
我在下面的回答中对 M_FAST 进行了说明。