Re: Fix to comm buffer leak for upstream-going messages

Brian Paul <[email protected]> Mon, 08 Nov 2004 09:11:53 -0700
Newsgroups gmane.comp.graphics.chromium.devel
Message-ID <[email protected]>
Joel Welling wrote:
> Hi folks;
>   It looks to me like every time a CR_MESSAGE_READ_PIXELS, WRITEBACK, or 
> READBACK is sent upstream the communications buffer is never freed.  I have a 
> patch to packspu_net.c, replicatespu_net.c, tilesortspu_net.c, and net.c where 
> crNetFree(conn,buf); is added after the appropriate bit of the case 
> statements.  For example, in packspu_net.c the code becomes:
> 
>   		case CR_MESSAGE_READ_PIXELS:
>   			packspuReadPixels( &(msg->readPixels), len );
>   			crNetFree(conn,buf);
>   			break;
>   		case CR_MESSAGE_WRITEBACK:
>   			packspuWriteback( &(msg->writeback) );
>   			crNetFree(conn,buf);
>   			break;
>   		case CR_MESSAGE_READBACK:
>   			packspuReadback( &(msg->readback), len );
>   			crNetFree(conn,buf);
>   			break;
>   		default:
>   			/*crWarning( "Why is the pack SPU getting a message of type 0x%x?", msg->
> type ); */
> 
>   Before I check this in, can someone who knows the network layer look at this 
> and verify that I'm talking sense?  I know this fix allows my application to 
> run on Quadrics without running out of Quadrics card memory.

The above change to the pack SPU causes an assertion failure for me. 
If you compile chromium with RELEASE=0 and test with crdemo.conf and 
TCP/IP you'll see it.

If I find time later, I'll try to narrow down the cause.

-Brian


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click