Commit 499ec075 authored by Cedric Roux's avatar Cedric Roux

- 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
parent cd22e69f
......@@ -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;
}
......
......@@ -312,7 +312,7 @@ int itti_dump_queue_message(message_number_t message_number,
DevAssert(message_name != NULL);
DevAssert(message_p != NULL);
new = calloc(1, sizeof(itti_dump_queue_item_t));
new = malloc(sizeof(itti_dump_queue_item_t));
if (new == NULL) {
ITTI_DUMP_ERROR("Failed to allocate memory (%s:%d)\n",
......
......@@ -85,7 +85,8 @@ const char* eurecomVariablesNames[] = {
"itti_poll_msg",
"itti_poll_msg_end",
"itti_recv_msg",
"itti_recv_msg_end"
"itti_recv_msg_end",
"itti_alloc_msg"
};
const char* eurecomFunctionsNames[] = {
......
......@@ -55,6 +55,7 @@ typedef enum
VCD_SIGNAL_DUMPER_VARIABLE_ITTI_POLL_MSG_END,
VCD_SIGNAL_DUMPER_VARIABLE_ITTI_RECV_MSG,
VCD_SIGNAL_DUMPER_VARIABLE_ITTI_RECV_MSG_END,
VCD_SIGNAL_DUMPER_VARIABLE_ITTI_ALLOC_MSG,
VCD_SIGNAL_DUMPER_VARIABLES_LAST,
VCD_SIGNAL_DUMPER_VARIABLES_END = VCD_SIGNAL_DUMPER_VARIABLES_LAST,
} vcd_signal_dump_variables;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment