Reg Mailbox_destruct

Started by Lakshman Kumar November 23, 2007
i have created a heap for 8192 bytes
in my code i have made a MailBox_construct() which allocates memory for
but when i free using MailBOx_destruct the number of bytes which was
allocated is not released
freeMemBeforeConstr = getFreeMemory();

// Create a mailbox in testHeap
Mailbox_construct( &mailboxStruct0, sizeof(MsgObj), 1, NULL, NULL );

//will return free size available
freeMemAfterConstr = getFreeMemory();


freeMemAfterDestr = getFreeMemory();
if (freeMemBeforeConstr == freeMemAfterDestr) {
System_printf("Mailbox Handle to Object conversion succeeded\n");
System_printf("After destruct,available heap size increased\n");
else {
System_printf("Error:Mailbox_destruct() doesn't free any memory\n");

lakshman kumar