On Wed, 18 Mar 2009 10:40:44 +0100 Thomas Hellström <[email protected]> wrote:
> Jerome Glisse wrote: > > Hi Thomas, > > > > In ttm_buffer_object_transfer a gosh object is created > > but it reuse the destroy function of the original object > > if the driver set this function to somethins unusual > > bad things can happen. Shouldn't we instead set this > > function to the normal bo kree one ? > > > > Cheers, > > Jerome Glisse <[email protected]> > > > Jerome, > Yes and no. > > We should use kfree as you say, but we have to set up a private destroy > function in ttm_bo_util.c that > does nothing but kfree. If we set the destroy function to NULL, the > default one will call kfree, but in > addition release accounted memory. > > Since the ghost bo is a temporary object that cannot be held > indefinitely by user-space, it is not included in the memory accounting. > > This code path has never been exercised, and it apparently contains some > glitches. > > /Thomas. > > Didn't think to the global accounting, i guess i can add a small function just above ttm_buffer_object_transfer and set destroy to point to so global accounting isn't updated. -- Jerome Glisse <[email protected]> ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com -- _______________________________________________ Dri-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dri-devel
