Re: Mustek Paragon 1200SP

Andreas Beck (becka@rz.uni-duesseldorf.de)
Thu, 19 Aug 1999 19:55:02 +0200

> > The memset is just more clean and doesn't leave you with garbage in the
> > top few lines (which are wrong anyway due to the lack of correction data).

> Wouldn't s/malloc/calloc/ and tidy up be better style?

Yes. I had made the patch after I got it to work right. It isn't intended to
be applied to a the sane source to make a final version, just to show what
is wrong.

I hadn't used calloc, as when you are debugging (especially very strange
errors that might be a buffer overrun), it is almost always bad to do
multiple things at one.

> clearing it once immediately after allocation it could be a performance
> improvement to let the libc know that when you allocate.

Well - not that it would matter. We are talking about 0.5M max, but ...

CU, ANdy

-- 
= Andreas Beck                    |  Email :  <andreas.beck@ggi-project.org> =

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com