On Sun, 2010-08-22 at 15:56 +0300, Yonit Halperin wrote:
> On 08/20/2010 09:54 PM, al...@redhat.com wrote:
> > From: Alexander Larsson<al...@redhat.com>
> >
> > This is smaller than a byte array, and allows us to skip full
> > blocks of 32 ids in one check.
> > ---
> 
> Hi,
> why not use a linked list, for free surfaces, in a static 
> UINT32[n_surfaces] array? Any reason besides space, which is 4k?

In fact, the best way to do this would probably be to chain the free
surfaces together into a linked list using e.g. SurfaceInfo->pdev which
are unused for free surface_infos. This way we use no extra memory.

> shouldn't it be ~(0x80000000 >> (surface_id % 32))?

> > +        if (used_mask == 0xffffffff) {
> shouldn't it be used_mask != 0xffffffff?

Yeah, Good catches.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
       al...@redhat.com            alexander.lars...@gmail.com 
He's a notorious sweet-toothed cat burglar moving from town to town, helping 
folk in trouble. She's a supernatural tempestuous doctor married to the Mob. 
They fight crime! 

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to