我在程序的这一部分:
ProcessItem *new_process = (ProcessItem *)malloc(sizeof(ProcessItem));
printf("%p, %d\n", new_process, errno);
if(NULL == new_process) {
printf("%p, %d\n", new_process, errno);
panic("SS: ProcessItem malloc failed.\n");
}
ProcessItem为:
typedef struct ProcessItem{
struct ProcessItem *next_item;
endpoint_t ep;
SensitivityItem *process_sensitivities; /*iterate sensitivities for proc*/
} ProcessItem;
有人知道为什么new_process指针突然变成NULL吗?