Mailing List archive

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

[linux-dvb] Re: refactoring



Oops, forgot to Cc: the list :-/

Date: Sun, 10 Oct 2004 14:05:58 +0200
From: Gerd Knorr <kraxel@bytesex.org>
Subject: Re: [linux-dvb] Re: refactoring
To: Holger Waechtler <holger@qanu.de>

> >Even a sane designed library will allocate and release the data
> >structures itself and *not* ask the user of the library to do that.
> >Data structures which are private (to the driver, to library or whatever
> >you prefeare to call it) should be maintained by the owner and not
> >someone else.  Not designing it this way is just insane and asking for
> >trouble, please don't.
> 
> nope. If the config and state structs are constant sized it is a very 
> good thing to collect them in the card description struct and allocate 
> one big chunk of card data instead of several small ones.

config yes.  Often you don't even have to allocate it but can use static
data and just pass a pointer to it.

state no.

  Gerd

-- 
return -ENOSIG;




Home | Main Index | Thread Index