[dev] [sbase] Why do extra work when the kernel will do it more efficiently?

2014-12-16 Thread Truls Becken
Hi everyone,

As the original contributor of sbase cut, I can't help wondering what the
purpose of the mem freeing added in the two commits from 1st of June is
supposed to be. The most efficient and reliable way to free allocated memory
is to terminate the process. There is no reason to clean things up just to
exit immediately after. Also, the line buffer was reused on purpose, no need
to allocate a new one per file.

-Truls



Re: [dev] [sbase] Why do extra work when the kernel will do it more efficiently?

2014-12-16 Thread Dimitris Papastamos
On Tue, Dec 16, 2014 at 08:33:17PM +0100, Truls Becken wrote:
 Hi everyone,
 
 As the original contributor of sbase cut, I can't help wondering what the
 purpose of the mem freeing added in the two commits from 1st of June is
 supposed to be. The most efficient and reliable way to free allocated memory
 is to terminate the process. There is no reason to clean things up just to
 exit immediately after. Also, the line buffer was reused on purpose, no need
 to allocate a new one per file.

Agreed, the current behaviour should be reverted.