- Converted calloc to malloc in ITTI to save some time

- Added vcd signal for alloc of message

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4551 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
Cedric Roux
2013-12-02 08:58:32 +00:00
parent cd22e69f5e
commit 499ec0753a
4 changed files with 15 additions and 5 deletions
+9 -1
View File
@@ -254,19 +254,27 @@ inline MessageDef *itti_alloc_new_message_sized(task_id_t origin_task_id, Messag
DevCheck(message_id < itti_desc.messages_id_max, message_id, itti_desc.messages_id_max, 0);
#if defined(OAI_EMU) || defined(RTAI)
vcd_signal_dumper_dump_variable_by_name(VCD_SIGNAL_DUMPER_VARIABLE_ITTI_ALLOC_MSG, size);
#endif
if (origin_task_id == TASK_UNKNOWN)
{
/* Try to identify real origin task ID */
origin_task_id = itti_get_current_task_id();
}
temp = calloc (1, sizeof(MessageHeader) + size);
temp = malloc (sizeof(MessageHeader) + size);
DevAssert(temp != NULL);
temp->ittiMsgHeader.messageId = message_id;
temp->ittiMsgHeader.originTaskId = origin_task_id;
temp->ittiMsgHeader.ittiMsgSize = size;
#if defined(OAI_EMU) || defined(RTAI)
vcd_signal_dumper_dump_variable_by_name(VCD_SIGNAL_DUMPER_VARIABLE_ITTI_ALLOC_MSG, 0);
#endif
return temp;
}