Sign in

username:

password:



Not a member?

Search code-comp



Search tips

Subscribe to code-comp



code-comp by Keywords

ARM7 | BIOS | Bug | EVM | JTAG | Linker | LOG_printf | McBSP | Profiling | Relocation | RTDX | Simulator | Target | Watch

Discussion Groups

Discussion Groups | Code-Composer | Reg Mailbox_destruct

Technical discussions about Code Composer Studio.

  

Post a new Thread

Reg Mailbox_destruct - Lakshman Kumar - Nov 23 7:30:05 2007



Hi
i have created a heap for 8192 bytes
in my code i have made a MailBox_construct() which allocates memory for
64bytes
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();

  Mailbox_destruct(Mailbox_struct(mbx0));

    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



(You need to be a member of code-comp -- send a blank email to code-comp-subscribe@yahoogroups.com )