From owner-svn-src-all@FreeBSD.ORG Sun Apr 19 11:20:57 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2F7B106566C; Sun, 19 Apr 2009 11:20:57 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A56878FC15; Sun, 19 Apr 2009 11:20:57 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3JBKvfU007840; Sun, 19 Apr 2009 11:20:57 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3JBKvEs007838; Sun, 19 Apr 2009 11:20:57 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200904191120.n3JBKvEs007838@svn.freebsd.org> From: Robert Watson Date: Sun, 19 Apr 2009 11:20:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191267 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2009 11:20:59 -0000 Author: rwatson Date: Sun Apr 19 11:20:57 2009 New Revision: 191267 URL: http://svn.freebsd.org/changeset/base/191267 Log: Garbage collect now-unused struct malloc_type fields, bump __FreeBSD_version as kernel modules will need to be rebuilt. These fields existed to support binary compatibility with kernel modules from before the introduction of libmemstat(3) in FreeBSD 6.x, so they are no longer required. Modified: head/sys/sys/malloc.h head/sys/sys/param.h Modified: head/sys/sys/malloc.h ============================================================================== --- head/sys/sys/malloc.h Sun Apr 19 09:56:30 2009 (r191266) +++ head/sys/sys/malloc.h Sun Apr 19 11:20:57 2009 (r191267) @@ -1,7 +1,7 @@ /*- * Copyright (c) 1987, 1993 * The Regents of the University of California. - * Copyright (c) 2005 Robert N. M. Watson + * Copyright (c) 2005, 2009 Robert N. M. Watson * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -94,35 +94,15 @@ struct malloc_type_internal { }; /* - * ABI-compatible version of the old 'struct malloc_type', only all stats are - * now malloc-managed in malloc-owned memory rather than in caller memory, so - * as to avoid ABI issues. The ks_next pointer is reused as a pointer to the - * internal data handle. + * Public data structure describing a malloc type. Private data is hung off + * of ks_handle to avoid encoding internal malloc(9) data structures in + * modules, which will statically allocate struct malloc_type. */ struct malloc_type { struct malloc_type *ks_next; /* Next in global chain. */ - u_long _ks_memuse; /* No longer used. */ - u_long _ks_size; /* No longer used. */ - u_long _ks_inuse; /* No longer used. */ - uint64_t _ks_calls; /* No longer used. */ - u_long _ks_maxused; /* No longer used. */ u_long ks_magic; /* Detect programmer error. */ const char *ks_shortdesc; /* Printable type name. */ - - /* - * struct malloc_type was terminated with a struct mtx, which is no - * longer required. For ABI reasons, continue to flesh out the full - * size of the old structure, but reuse the _lo_class field for our - * internal data handle. - */ void *ks_handle; /* Priv. data, was lo_class. */ - const char *_lo_name; - const char *_lo_type; - u_int _lo_flags; - void *_lo_list_next; - struct witness *_lo_witness; - uintptr_t _mtx_lock; - u_int _mtx_recurse; }; /* @@ -148,8 +128,7 @@ struct malloc_type_header { #ifdef _KERNEL #define MALLOC_DEFINE(type, shortdesc, longdesc) \ struct malloc_type type[1] = { \ - { NULL, 0, 0, 0, 0, 0, M_MAGIC, shortdesc, NULL, NULL, \ - NULL, 0, NULL, NULL, 0, 0 } \ + { NULL, M_MAGIC, shortdesc, NULL } \ }; \ SYSINIT(type##_init, SI_SUB_KMEM, SI_ORDER_SECOND, malloc_init, \ type); \ Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sun Apr 19 09:56:30 2009 (r191266) +++ head/sys/sys/param.h Sun Apr 19 11:20:57 2009 (r191267) @@ -57,7 +57,7 @@ * is created, otherwise 1. */ #undef __FreeBSD_version -#define __FreeBSD_version 800080 /* Master, propagated to newvers */ +#define __FreeBSD_version 800081 /* Master, propagated to newvers */ #ifndef LOCORE #include