bug-findutils
[Top][All Lists]
Advanced

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

Re: Allocating memory in parser.c


From: James Youngman
Subject: Re: Allocating memory in parser.c
Date: Sat, 31 Mar 2007 17:05:41 +0100

On 3/31/07, address@hidden <address@hidden> wrote:

This is not of concern to the xattr support, but the question popped up
nevertheless:

Is there a place to free memory that has been allocated in a parse_*
function?

There isn't.  This is mainly because in the current implementation of
find this doesn't need to happen.   Adding such a feature would mean
that the implementation would need to deal correct with the three
outgong links from each node (pred_next, pred_left and pred_right).

It seems to me that a predicate being removed would have to have no
left or right children.   As for pred_next, it's in a sense a shame we
have it, because it is pretty much only used at parse time, after we
have read all the tests from the command line but before we have built
the parse three.

James.


James.




reply via email to

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