AnsweredAssumed Answered

Memory leak in timer create and delete

Question asked by sasi_bala on Mar 25, 2013
Latest reply on Apr 2, 2013 by sonic



    I'm using timer in my application and I see memory leak when timer is create/delete very often. Could some one help me on this?


Following are the parameters used in timer creation


    struct sigaction stSigact;

    struct sigevent stSigevent;


    stSigact.sa_sigaction = (void*)Timeout_Handler;



    stSigact.sa_flags = SA_SIGINFO;

    (void) sigaction(SIGALRM, &stSigact, NULL);


    stSigevent.sigev_notify = SIGEV_SIGNAL;

    stSigevent.sigev_signo = SIGALRM;

     /* Set the state as signal value to identify from which timer the signal is generated*/

    stSigevent.sigev_value.sival_int = pstClkTimerValues->eState;


     /* Create and arm periodic mark timer */

    timer_create(CLOCK_REALTIME, &stSigevent,&TimerID) ;