diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2023-07-03 06:45:45 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2023-07-03 06:45:45 +0000 |
commit | a46686b4fde30a9b3d062bf9591edbbeac94172e (patch) | |
tree | f8c2b7bcfc6c17cf9dd3e9fbd31a8a56aaec62c4 | |
parent | af704f6436b692e431e2625ac256c6bec2949c5c (diff) |
Bring malloc(9) and <sys/malloc.h> into sync for M_* entries, such
that the former's text comes from the latter's comments. Rationalize
capitalization, whitespace, and plural-vs-singular. Mark things for
for automation in the future.
Prompted by loss of sync from the addition of M_IFGROUP and M_PF
Previously worked up in discussion with schwarze@ and jmc@
ok deraadt@, miod@, jmc@
-rw-r--r-- | share/man/man9/malloc.9 | 18 | ||||
-rw-r--r-- | sys/sys/malloc.h | 110 |
2 files changed, 66 insertions, 62 deletions
diff --git a/share/man/man9/malloc.9 b/share/man/man9/malloc.9 index 727ee1300b6..8d9f8a71c13 100644 --- a/share/man/man9/malloc.9 +++ b/share/man/man9/malloc.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: malloc.9,v 1.69 2023/03/17 19:44:15 millert Exp $ +.\" $OpenBSD: malloc.9,v 1.70 2023/07/03 06:45:44 guenther Exp $ .\" $NetBSD: malloc.9,v 1.2 1996/10/30 05:29:54 lukem Exp $ .\" .\" Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: March 17 2023 $ +.Dd $Mdocdate: July 3 2023 $ .Dt MALLOC 9 .Os .Sh NAME @@ -148,20 +148,23 @@ are enabled. The following types are currently defined: .Pp .Bl -tag -offset indent -width XXXXXXXXXXXXXX -compact -.It Dv M_FREE -Should be on free list. +.\" START DEFINES sys/malloc.h (M_FREE,M_LAST) .It Dv M_DEVBUF Device driver memory. .It Dv M_PCB Protocol control blocks. .It Dv M_RTABLE Routing tables. +.It Dv M_PF +Packet filter structures. .It Dv M_IFADDR Interface addresses. +.It Dv M_IFGROUP +Interface groups. .It Dv M_SYSCTL Sysctl persistent buffers. .It Dv M_COUNTERS -Per-CPU Counters for use via +Per-CPU counters via .Xr counters_alloc 9 . .It Dv M_IOCTLOPS Ioctl data buffers. @@ -275,7 +278,7 @@ related credentials. .It Dv M_IP6OPT IPv6 options. .It Dv M_IP6NDP -IPv6 neighbour discovery structures. +IPv6 Neighbor Discovery structures. .It Dv M_TEMP Miscellaneous temporary data buffers. .It Dv M_NTFSMNT @@ -306,11 +309,12 @@ UDF mount structures. .It Dv M_UDFFENTRY UDF file entries. .It Dv M_UDFFID -UDF file ID. +UDF file IDs. .It Dv M_AGP AGP memory. .It Dv M_DRM Direct Rendering Manager. +.\" END DEFINES .El .Sh CONTEXT .Fn malloc diff --git a/sys/sys/malloc.h b/sys/sys/malloc.h index 14a6ff9182c..81fcbcfc310 100644 --- a/sys/sys/malloc.h +++ b/sys/sys/malloc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: malloc.h,v 1.124 2023/06/30 09:58:30 mvs Exp $ */ +/* $OpenBSD: malloc.h,v 1.125 2023/07/03 06:45:44 guenther Exp $ */ /* $NetBSD: malloc.h,v 1.39 1998/07/12 19:52:01 augustss Exp $ */ /* @@ -66,116 +66,116 @@ /* 1 - free */ #define M_DEVBUF 2 /* device driver memory */ /* 3 - free */ -#define M_PCB 4 /* protocol control block */ +#define M_PCB 4 /* protocol control blocks */ #define M_RTABLE 5 /* routing tables */ -#define M_PF 6 /* packet filter structures */ +#define M_PF 6 /* packet filter structures */ /* 7 - free */ /* 8 - free */ -#define M_IFADDR 9 /* interface address */ -#define M_IFGROUP 10 /* interface group */ -#define M_SYSCTL 11 /* sysctl buffers (persistent storage) */ -#define M_COUNTERS 12 /* per CPU counters */ +#define M_IFADDR 9 /* interface addresses */ +#define M_IFGROUP 10 /* interface groups */ +#define M_SYSCTL 11 /* sysctl persistent buffers */ +#define M_COUNTERS 12 /* per-CPU counters via counters_alloc(9) */ /* 13 - free */ -#define M_IOCTLOPS 14 /* ioctl data buffer */ +#define M_IOCTLOPS 14 /* ioctl data buffers */ /* 15-18 - free */ -#define M_IOV 19 /* large iov's */ -#define M_MOUNT 20 /* vfs mount struct */ +#define M_IOV 19 /* large IOVs */ +#define M_MOUNT 20 /* VFS mount structs */ /* 21 - free */ -#define M_NFSREQ 22 /* NFS request header */ -#define M_NFSMNT 23 /* NFS mount structure */ -#define M_LOG 24 /* Messages in kernel log stash */ +#define M_NFSREQ 22 /* NFS request headers */ +#define M_NFSMNT 23 /* NFS mount structures */ +#define M_LOG 24 /* messages in kernel log stash */ #define M_VNODE 25 /* Dynamically allocated vnodes */ /* 26 - free */ #define M_DQUOT 27 /* UFS quota entries */ -#define M_UFSMNT 28 /* UFS mount structure */ +#define M_UFSMNT 28 /* UFS mount structures */ #define M_SHM 29 /* SVID compatible shared memory segments */ #define M_VMMAP 30 /* VM map structures */ #define M_SEM 31 /* SVID compatible semaphores */ -#define M_DIRHASH 32 /* UFS dirhash */ -#define M_ACPI 33 /* ACPI */ -#define M_VMPMAP 34 /* VM pmap */ +#define M_DIRHASH 32 /* UFS directory hash structures */ +#define M_ACPI 33 /* ACPI structures */ +#define M_VMPMAP 34 /* VM pmap data */ /* 35-38 - free */ -#define M_FILEDESC 39 /* Open file descriptor table */ -#define M_SIGIO 40 /* Sigio structures */ -#define M_PROC 41 /* Proc structures */ -#define M_SUBPROC 42 /* Proc sub-structures */ +#define M_FILEDESC 39 /* open file descriptor tables */ +#define M_SIGIO 40 /* sigio structures */ +#define M_PROC 41 /* proc structures */ +#define M_SUBPROC 42 /* proc sub-structures */ /* 43-45 - free */ #define M_MFSNODE 46 /* MFS vnode private part */ /* 47-48 - free */ -#define M_NETADDR 49 /* Export host address structure */ -#define M_NFSSVC 50 /* Nfs server structure */ +#define M_NETADDR 49 /* export host address structures */ +#define M_NFSSVC 50 /* NFS server structures */ /* 51 - free */ -#define M_NFSD 52 /* Nfs server daemon structure */ +#define M_NFSD 52 /* NFS server daemon structures */ #define M_IPMOPTS 53 /* internet multicast options */ -#define M_IPMADDR 54 /* internet multicast address */ -#define M_IFMADDR 55 /* link-level multicast address */ +#define M_IPMADDR 54 /* internet multicast addresses */ +#define M_IFMADDR 55 /* link-level multicast addresses */ #define M_MRTABLE 56 /* multicast routing tables */ -#define M_ISOFSMNT 57 /* ISOFS mount structure */ +#define M_ISOFSMNT 57 /* ISOFS mount structures */ #define M_ISOFSNODE 58 /* ISOFS vnode private part */ -#define M_MSDOSFSMNT 59 /* MSDOS FS mount structure */ -#define M_MSDOSFSFAT 60 /* MSDOS FS fat table */ +#define M_MSDOSFSMNT 59 /* MSDOS FS mount structures */ +#define M_MSDOSFSFAT 60 /* MSDOS FS FAT tables */ #define M_MSDOSFSNODE 61 /* MSDOS FS vnode private part */ #define M_TTYS 62 /* allocated tty structures */ #define M_EXEC 63 /* argument lists & other mem used by exec */ -#define M_MISCFSMNT 64 /* miscfs mount structures */ -#define M_FUSEFS 65 /* fusefs mount structures */ +#define M_MISCFSMNT 64 /* miscellaneous FS mount structures */ +#define M_FUSEFS 65 /* FUSE FS mount structures */ /* 66-73 - free */ #define M_PFKEY 74 /* pfkey data */ -#define M_TDB 75 /* Transforms database */ +#define M_TDB 75 /* transforms database */ #define M_XDATA 76 /* IPsec data */ /* 77 - free */ -#define M_PAGEDEP 78 /* File page dependencies */ -#define M_INODEDEP 79 /* Inode dependencies */ -#define M_NEWBLK 80 /* New block allocation */ +#define M_PAGEDEP 78 /* file page dependencies */ +#define M_INODEDEP 79 /* inode dependencies */ +#define M_NEWBLK 80 /* new block allocation */ /* 81-82 - free */ -#define M_INDIRDEP 83 /* Indirect block dependencies */ +#define M_INDIRDEP 83 /* indirect block dependencies */ /* 84-91 - free */ -#define M_VMSWAP 92 /* VM swap structures */ +#define M_VMSWAP 92 /* VM swap structures */ /* 93-97 - free */ -#define M_UVMAMAP 98 /* UVM amap and related */ -#define M_UVMAOBJ 99 /* UVM aobj and related */ +#define M_UVMAMAP 98 /* UVM amap and related */ +#define M_UVMAOBJ 99 /* UVM aobj and related */ /* 100 - free */ #define M_USB 101 /* USB general */ #define M_USBDEV 102 /* USB device driver */ #define M_USBHC 103 /* USB host controller */ -#define M_WITNESS 104 /* witness data */ -#define M_MEMDESC 105 /* Memory range */ +#define M_WITNESS 104 /* witness(4) memory */ +#define M_MEMDESC 105 /* memory range */ /* 106-107 - free */ -#define M_CRYPTO_DATA 108 /* Crypto framework data buffers (keys etc.) */ +#define M_CRYPTO_DATA 108 /* crypto(9) data buffers */ /* 109 - free */ -#define M_CREDENTIALS 110 /* IPsec-related credentials and ID info */ +#define M_CREDENTIALS 110 /* ipsec(4) related credentials */ /* 111-122 - free */ /* KAME IPv6 */ #define M_IP6OPT 123 /* IPv6 options */ -#define M_IP6NDP 124 /* IPv6 Neighbour Discovery */ +#define M_IP6NDP 124 /* IPv6 Neighbor Discovery structures */ /* 125-126 - free */ -#define M_TEMP 127 /* misc temporary data buffers */ +#define M_TEMP 127 /* miscellaneous temporary data buffers */ -#define M_NTFSMNT 128 /* NTFS mount structure */ +#define M_NTFSMNT 128 /* NTFS mount structures */ #define M_NTFSNTNODE 129 /* NTFS ntnode information */ #define M_NTFSFNODE 130 /* NTFS fnode information */ -#define M_NTFSDIR 131 /* NTFS dir buffer */ +#define M_NTFSDIR 131 /* NTFS directory buffers */ #define M_NTFSNTHASH 132 /* NTFS ntnode hash tables */ #define M_NTFSNTVATTR 133 /* NTFS file attribute information */ #define M_NTFSRDATA 134 /* NTFS resident data */ -#define M_NTFSDECOMP 135 /* NTFS decompression temporary */ +#define M_NTFSDECOMP 135 /* NTFS decompression temporary storage */ #define M_NTFSRUN 136 /* NTFS vrun storage */ -#define M_KEVENT 137 /* kqueue related */ +#define M_KEVENT 137 /* kqueue(2) data structures */ /* 138 free */ -#define M_SYNCACHE 139 /* syn cache hash array */ +#define M_SYNCACHE 139 /* SYN cache hash array */ -#define M_UDFMOUNT 140 /* UDF mount */ -#define M_UDFFENTRY 141 /* UDF file entry */ -#define M_UDFFID 142 /* UDF file id */ +#define M_UDFMOUNT 140 /* UDF mount structures */ +#define M_UDFFENTRY 141 /* UDF file entries */ +#define M_UDFFID 142 /* UDF file IDs */ /* 143 free */ -#define M_AGP 144 /* AGP Memory */ +#define M_AGP 144 /* AGP memory */ -#define M_DRM 145 /* Direct Rendering Manager */ +#define M_DRM 145 /* Direct Rendering Manager */ #define M_LAST 146 /* Must be last type + 1 */ |