On Mon, Nov 3, 2008 at 1:00 AM, Cyril Plisko <[EMAIL PROTECTED]> wrote: > On Sun, Nov 2, 2008 at 8:28 PM, Peter Buckingham > <[EMAIL PROTECTED]> wrote: >> Hi Cyril, >> >> Cyril Plisko wrote: >>> >>> I am recently spending quite some time getting acquainted with COMSTAR >>> source code and it seems that the code could use some cleanups. Both >>> cstyle and various small non-cstyle. >>> Is there any interest in such cleanups ? If so I am willing to >>> contribute it - this work has a nice side effect of helping me >>> understand code better :) >> >> I'd suggest sending the diffs along and we can work through them. >> > > Peter, > > ok, here we go: > > > o 03-kmem_alloc.patch > > This patch changes calls to kmem_alloc() to kmem_zalloc(). I believe > it is cleaner (the buffers coming from kmem_alloc() are deterministic) > that way and in one place it helps simplifying the code somewhat (see > stmf_sbd.c:867)
zalloc has its overhead, so there should be some reason to zero-fill the structure before using it. If there's some non-trivial initialization, kmem_cache would be more suitable. Regards, Andrey _______________________________________________ storage-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/storage-discuss
