[Tux3] Add more buffer debug code

OGAWA Hirofumi hirofumi at mail.parknet.co.jp
Sat Jan 10 15:19:43 PST 2009


Daniel Phillips <phillips at phunq.net> writes:

> How should free_buffer work if there are mixed prealloc and randomly
> allocated buffers?  Just free the prealloc vector and not worry about
> randomly allocated buffers, as that is just a hack to keep going when
> prealloc failed for some reason?  Or maybe just eliminate random alloc
> when we are using prealloc.  Instead have prealloc try again with a
> smaller allocation until it succeeds, which is useful when running in
> a tiny test environment like UML.  There is no urgency to improving
> this.

If we use prealloc, debug code would be off.  (I.e. #define
BUFFER_PARANOIA_DEBUG will off prealloc, and #undef will on prealloc).

> Sharing hexdump between kernel and userspace broke the kernel build
> because there is no definition of printf without including tux3.h,
> which I would like to avoid for this otherwise completely independent
> utility.

I see. Sorry, I didn't notice it.
-- 
OGAWA Hirofumi <hirofumi at mail.parknet.co.jp>

_______________________________________________
Tux3 mailing list
Tux3 at tux3.org
http://mailman.tux3.org/cgi-bin/mailman/listinfo/tux3



More information about the Tux3 mailing list