[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory allocation problem with flex&bison

From: jluceant
Subject: Re: Memory allocation problem with flex&bison
Date: 19 Oct 2006 08:45:34 -0700
User-agent: G2/1.0

Ok, I have the solution:
 + Make a list with the address of all allocation
 + Free the memory when you want.

:-) Thanks... wrote:
> Hi groups,
> I have a problem using flex to parse a file.
> The following rules has been defined:
> {space}{alnum}        {
>   yylval.string=(char*)strdup(yytext);
>   return(ALNUM);
> }
> But as described in the strdup manual, a memory allocation is done. I
> have a leak and I would like to know where to put the free memory
> allocation:in the flex code or in the bison code ?
> I'm not expert in flex&bison, I need a good help.
> José

reply via email to

[Prev in Thread] Current Thread [Next in Thread]