Hi all,
One more post I am posting about the passing of a static structure pointer . The code below explains that I am declaring a structure object and a pointer static and initialising the pointer to the object in the ISR. I am then passing the pointer to another function called in the ISR. The function definition is shown below also
/* the structure declaration in a header file included in both the source files*/
struct stl{
float a[10];
float b[10];
};
interrupt void dmax_isr( void )
{static stl fd;
static stl *pt;
compute(pt);
}
void compute(struct stl *a)
{
/* the changes are made here to the elements of the structure using this local pointer *a , */
}
Is this a correct and safe way to pass static pointers? I am unable to find memory leaks but executing this above code with higher input blocks indicates memory leaks.
Please help.
ANushree