From owner-svn-src-projects@FreeBSD.ORG Tue Feb 16 00:21:33 2010 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8B1E1065676; Tue, 16 Feb 2010 00:21:33 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 72FD28FC16; Tue, 16 Feb 2010 00:21:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1G0LXkO057966; Tue, 16 Feb 2010 00:21:33 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1G0LXEb057964; Tue, 16 Feb 2010 00:21:33 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201002160021.o1G0LXEb057964@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 16 Feb 2010 00:21:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203941 - projects/tcp_cc_head/sys/netinet X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 00:21:33 -0000 Author: lstewart Date: Tue Feb 16 00:21:33 2010 New Revision: 203941 URL: http://svn.freebsd.org/changeset/base/203941 Log: - Fix a memory leak caused by creating the helper's uma zone with the UMA_ZONE_NOFREE flag. Modified: projects/tcp_cc_head/sys/netinet/h_ertt.c Modified: projects/tcp_cc_head/sys/netinet/h_ertt.c ============================================================================== --- projects/tcp_cc_head/sys/netinet/h_ertt.c Tue Feb 16 00:08:42 2010 (r203940) +++ projects/tcp_cc_head/sys/netinet/h_ertt.c Tue Feb 16 00:21:33 2010 (r203941) @@ -1,7 +1,8 @@ /*- * Copyright (c) 2009-2010 * Swinburne University of Technology, Melbourne, Australia -* All rights reserved. + * Copyright (c) 2010 Lawrence Stewart + * All rights reserved. * * This software was developed at the Centre for Advanced Internet * Architectures, Swinburne University, by David Hayes and Lawrence Stewart, @@ -85,10 +86,6 @@ struct txseginfo { /* flags for operation */ u_int flags; }; -/* txseginfo flags */ -#define TXSI_TSO 0x01 /* TSO was used for this entry */ -#define TXSI_RTT_MEASURE_START 0x02 /* a rate measure starts here based on this txsi's rtt */ -#define TXSI_RX_MEASURE_END 0x04 /* measure the received rate until this txsi */ /* txseginfo flags */ #define TXSI_TSO 0x01 /* TSO was used for this entry */ @@ -322,7 +319,7 @@ ertt_mod_init(void) int ret; V_txseginfo_zone = uma_zcreate("txseginfo", sizeof(struct txseginfo), - NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); + NULL, NULL, NULL, NULL, 0, 0); ret = register_hhook(HHOOK_TYPE_TCP, HHOOK_TCP_ESTABLISHED_IN, &ertt_helper, &ertt_packet_measurement_hook, NULL, HHOOK_WAITOK); @@ -377,7 +374,6 @@ ertt_uma_dtor(void *mem, int size, void uma_zfree(V_txseginfo_zone, txsi); txsi = n_txsi; } - } DECLARE_HELPER_UMA(ertt, &ertt_helper, 1, sizeof(struct ertt), ertt_uma_ctor, ertt_uma_dtor);