From owner-cvs-all@FreeBSD.ORG Thu Mar 3 03:51:02 2005 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A66CB16A4CE; Thu, 3 Mar 2005 03:51:02 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8EA3943D49; Thu, 3 Mar 2005 03:51:02 +0000 (GMT) (envelope-from wpaul@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j233p20o035375; Thu, 3 Mar 2005 03:51:02 GMT (envelope-from wpaul@repoman.freebsd.org) Received: (from wpaul@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j233p2d7035374; Thu, 3 Mar 2005 03:51:02 GMT (envelope-from wpaul) Message-Id: <200503030351.j233p2d7035374@repoman.freebsd.org> From: Bill Paul Date: Thu, 3 Mar 2005 03:51:02 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/compat/ndis ndis_var.h subr_ndis.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Mar 2005 03:51:02 -0000 wpaul 2005-03-03 03:51:02 UTC FreeBSD src repository Modified files: sys/compat/ndis ndis_var.h subr_ndis.c Log: MAXPATHLEN is 1024, which means NdisOpenFile() and ndis_find_sym() were both consuming 1K of stack space. This is unfriendly. Allocate the buffers off the heap instead. It's a little slower, but these aren't performance critical routines. Also, add a spinlock to NdisAllocatePacketPool(), NdisAllocatePacket(), NdisFreePacketPool() and NdisFreePacket(). The pool is maintained as a linked list. I don't know for a fact that it can be corrupted, but why take chances. Revision Changes Path 1.35 +1 -0 src/sys/compat/ndis/ndis_var.h 1.76 +59 -17 src/sys/compat/ndis/subr_ndis.c