I have this part of my program:
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");
}
Where ProcessItem is:
typedef struct ProcessItem{
struct ProcessItem *next_item;
endpoint_t ep;
SensitivityItem *process_sensitivities; /*iterate sensitivities for proc*/
} ProcessItem;
Now this is the odd part: The output for the program looks like this:
Does anyone know why the new_process pointer is NULL all of a sudden?