188cf6634SMike Pritchard.\" 288cf6634SMike Pritchard.\" Copyright (c) 1996 The NetBSD Foundation, Inc. 388cf6634SMike Pritchard.\" All rights reserved. 488cf6634SMike Pritchard.\" 588cf6634SMike Pritchard.\" This code is derived from software contributed to The NetBSD Foundation 688cf6634SMike Pritchard.\" by Paul Kranenburg. 788cf6634SMike Pritchard.\" 888cf6634SMike Pritchard.\" Redistribution and use in source and binary forms, with or without 988cf6634SMike Pritchard.\" modification, are permitted provided that the following conditions 1088cf6634SMike Pritchard.\" are met: 1188cf6634SMike Pritchard.\" 1. Redistributions of source code must retain the above copyright 1288cf6634SMike Pritchard.\" notice, this list of conditions and the following disclaimer. 1388cf6634SMike Pritchard.\" 2. Redistributions in binary form must reproduce the above copyright 1488cf6634SMike Pritchard.\" notice, this list of conditions and the following disclaimer in the 1588cf6634SMike Pritchard.\" documentation and/or other materials provided with the distribution. 1688cf6634SMike Pritchard.\" 1788cf6634SMike Pritchard.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 1888cf6634SMike Pritchard.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 1988cf6634SMike Pritchard.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 2088cf6634SMike Pritchard.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE 2188cf6634SMike Pritchard.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2288cf6634SMike Pritchard.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2388cf6634SMike Pritchard.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2488cf6634SMike Pritchard.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2588cf6634SMike Pritchard.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2688cf6634SMike Pritchard.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 2788cf6634SMike Pritchard.\" POSSIBILITY OF SUCH DAMAGE. 2888cf6634SMike Pritchard.\" 29cc4a02e2SMatthew Dillon.\" $NetBSD: malloc.9,v 1.3 1996/11/11 00:05:11 lukem Exp $ 305bf6ab83SNik Clayton.\" 3130c6a668SMitchell Horne.Dd October 12, 2022 3288cf6634SMike Pritchard.Dt MALLOC 9 333d45e180SRuslan Ermilov.Os 3488cf6634SMike Pritchard.Sh NAME 3588cf6634SMike Pritchard.Nm malloc , 3630c6a668SMitchell Horne.Nm mallocarray , 3788cf6634SMike Pritchard.Nm free , 3830c6a668SMitchell Horne.Nm zfree , 39473e34ceSHartmut Brandt.Nm realloc , 40473e34ceSHartmut Brandt.Nm reallocf , 4130c6a668SMitchell Horne.Nm malloc_usable_size , 4230c6a668SMitchell Horne.Nm malloc_aligned , 4330c6a668SMitchell Horne.Nm malloc_exec , 4430c6a668SMitchell Horne.Nm MALLOC_DECLARE , 45473e34ceSHartmut Brandt.Nm MALLOC_DEFINE , 4630c6a668SMitchell Horne.Nm malloc_domainset , 4730c6a668SMitchell Horne.Nm malloc_domainset_aligned , 4830c6a668SMitchell Horne.Nm malloc_domainset_exec , 4930c6a668SMitchell Horne.Nm mallocarray_domainset 5088cf6634SMike Pritchard.Nd kernel memory management routines 5188cf6634SMike Pritchard.Sh SYNOPSIS 5232eef9aeSRuslan Ermilov.In sys/types.h 5332eef9aeSRuslan Ermilov.In sys/malloc.h 5488cf6634SMike Pritchard.Ft void * 55bd555da9SConrad Meyer.Fn malloc "size_t size" "struct malloc_type *type" "int flags" 56fd91e076SKristof Provost.Ft void * 57fd91e076SKristof Provost.Fn mallocarray "size_t nmemb" "size_t size" "struct malloc_type *type" "int flags" 5888cf6634SMike Pritchard.Ft void 592a94e401SPoul-Henning Kamp.Fn free "void *addr" "struct malloc_type *type" 6045035becSMatt Macy.Ft void 6145035becSMatt Macy.Fn zfree "void *addr" "struct malloc_type *type" 6244a8ff31SArchie Cobbs.Ft void * 63bd555da9SConrad Meyer.Fn realloc "void *addr" "size_t size" "struct malloc_type *type" "int flags" 6444a8ff31SArchie Cobbs.Ft void * 65bd555da9SConrad Meyer.Fn reallocf "void *addr" "size_t size" "struct malloc_type *type" "int flags" 665d4bf057SVladimir Kondratyev.Ft size_t 675d4bf057SVladimir Kondratyev.Fn malloc_usable_size "const void *addr" 68828afddaSMateusz Guzik.Ft void * 696162cf88SAdam Fenn.Fo malloc_aligned 706162cf88SAdam Fenn.Fa "size_t size" 716162cf88SAdam Fenn.Fa "size_t align" 726162cf88SAdam Fenn.Fa "struct malloc_type *type" 736162cf88SAdam Fenn.Fa "int flags" 746162cf88SAdam Fenn.Fc 756162cf88SAdam Fenn.Ft void * 76828afddaSMateusz Guzik.Fn malloc_exec "size_t size" "struct malloc_type *type" "int flags" 77c8185672SRuslan Ermilov.Fn MALLOC_DECLARE type 78473e34ceSHartmut Brandt.In sys/param.h 79473e34ceSHartmut Brandt.In sys/malloc.h 80473e34ceSHartmut Brandt.In sys/kernel.h 81c8185672SRuslan Ermilov.Fn MALLOC_DEFINE type shortdesc longdesc 829978bd99SMark Johnston.In sys/param.h 839978bd99SMark Johnston.In sys/domainset.h 8430c6a668SMitchell Horne.In sys/malloc.h 859978bd99SMark Johnston.Ft void * 869978bd99SMark Johnston.Fn malloc_domainset "size_t size" "struct malloc_type *type" "struct domainset *ds" "int flags" 87828afddaSMateusz Guzik.Ft void * 886162cf88SAdam Fenn.Fo malloc_domainset_aligned 896162cf88SAdam Fenn.Fa "size_t size" 906162cf88SAdam Fenn.Fa "size_t align" 916162cf88SAdam Fenn.Fa "struct malloc_type *type" 926162cf88SAdam Fenn.Fa "struct domainset *ds" 936162cf88SAdam Fenn.Fa "int flags" 946162cf88SAdam Fenn.Fc 956162cf88SAdam Fenn.Ft void * 96828afddaSMateusz Guzik.Fn malloc_domainset_exec "size_t size" "struct malloc_type *type" "struct domainset *ds" "int flags" 97c743a6bdSHans Petter Selasky.Ft void * 98c743a6bdSHans Petter Selasky.Fn mallocarray_domainset "size_t nmemb" "size_t size" "struct malloc_type *type" "struct domainset *ds" "int flags" 9988cf6634SMike Pritchard.Sh DESCRIPTION 10088cf6634SMike PritchardThe 10188cf6634SMike Pritchard.Fn malloc 10288cf6634SMike Pritchardfunction allocates uninitialized memory in kernel address space for an 10388cf6634SMike Pritchardobject whose size is specified by 10488cf6634SMike Pritchard.Fa size . 10544a8ff31SArchie Cobbs.Pp 10660dca836SPhilippe CharnierThe 1079978bd99SMark Johnston.Fn malloc_domainset 1089978bd99SMark Johnstonvariant allocates memory from a specific 1099978bd99SMark Johnston.Xr numa 4 1109978bd99SMark Johnstondomain using the specified domain selection policy. 11193f31533SJeff RobersonSee 1129978bd99SMark Johnston.Xr domainset 9 1139978bd99SMark Johnstonfor some example policies. 11493f31533SJeff Roberson.Pp 1156162cf88SAdam FennThe 1166162cf88SAdam Fenn.Fn malloc_aligned 1176162cf88SAdam Fennand 1186162cf88SAdam Fenn.Fn malloc_domainset_aligned 1196162cf88SAdam Fennvariants return allocations aligned as specified by 1206162cf88SAdam Fenn.Fa align , 1216162cf88SAdam Fennwhich must be non-zero, a power of two, and less than or equal to the page size. 1226162cf88SAdam Fenn.Pp 123828afddaSMateusz GuzikBoth 124828afddaSMateusz Guzik.Fn malloc_exec 125828afddaSMateusz Guzikand 126828afddaSMateusz Guzik.Fn malloc_domainset_exec 127828afddaSMateusz Guzikcan be used to return executable memory. 12830c6a668SMitchell HorneNot all platforms enforce a distinction between executable and non-executable 12930c6a668SMitchell Hornememory. 130828afddaSMateusz Guzik.Pp 13193f31533SJeff RobersonThe 132fd91e076SKristof Provost.Fn mallocarray 133fd91e076SKristof Provostfunction allocates uninitialized memory in kernel address space for an 134fd91e076SKristof Provostarray of 135fd91e076SKristof Provost.Fa nmemb 136fd91e076SKristof Provostentries whose size is specified by 137fd91e076SKristof Provost.Fa size . 138fd91e076SKristof Provost.Pp 139fd91e076SKristof ProvostThe 140c743a6bdSHans Petter Selasky.Fn mallocarray_domainset 141c743a6bdSHans Petter Selaskyvariant allocates memory from a specific 142c743a6bdSHans Petter Selasky.Xr numa 4 143c743a6bdSHans Petter Selaskydomain using the specified domain selection policy. 144c743a6bdSHans Petter SelaskySee 145c743a6bdSHans Petter Selasky.Xr domainset 9 146c743a6bdSHans Petter Selaskyfor some example policies. 147c743a6bdSHans Petter Selasky.Pp 148c743a6bdSHans Petter SelaskyThe 14988cf6634SMike Pritchard.Fn free 15060dca836SPhilippe Charnierfunction releases memory at address 15188cf6634SMike Pritchard.Fa addr 15288cf6634SMike Pritchardthat was previously allocated by 15388cf6634SMike Pritchard.Fn malloc 15444a8ff31SArchie Cobbsfor re-use. 15544a8ff31SArchie CobbsThe memory is not zeroed. 15644a8ff31SArchie CobbsIf 15744a8ff31SArchie Cobbs.Fa addr 15844a8ff31SArchie Cobbsis 15944a8ff31SArchie Cobbs.Dv NULL , 16044a8ff31SArchie Cobbsthen 16144a8ff31SArchie Cobbs.Fn free 16244a8ff31SArchie Cobbsdoes nothing. 16344a8ff31SArchie Cobbs.Pp 16445035becSMatt MacyLike 16545035becSMatt Macy.Fn free , 16645035becSMatt Macythe 16745035becSMatt Macy.Fn zfree 16845035becSMatt Macyfunction releases memory at address 16945035becSMatt Macy.Fa addr 17045035becSMatt Macythat was previously allocated by 17145035becSMatt Macy.Fn malloc 17245035becSMatt Macyfor re-use. 17345035becSMatt MacyHowever, 17445035becSMatt Macy.Fn zfree 17545035becSMatt Macywill zero the memory before it is released. 17645035becSMatt Macy.Pp 17744a8ff31SArchie CobbsThe 17844a8ff31SArchie Cobbs.Fn realloc 17944a8ff31SArchie Cobbsfunction changes the size of the previously allocated memory referenced by 18044a8ff31SArchie Cobbs.Fa addr 18144a8ff31SArchie Cobbsto 18244a8ff31SArchie Cobbs.Fa size 18344a8ff31SArchie Cobbsbytes. 18444a8ff31SArchie CobbsThe contents of the memory are unchanged up to the lesser of the new and 18544a8ff31SArchie Cobbsold sizes. 18644a8ff31SArchie CobbsNote that the returned value may differ from 18744a8ff31SArchie Cobbs.Fa addr . 18844a8ff31SArchie CobbsIf the requested memory cannot be allocated, 18944a8ff31SArchie Cobbs.Dv NULL 19044a8ff31SArchie Cobbsis returned and the memory referenced by 19144a8ff31SArchie Cobbs.Fa addr 19244a8ff31SArchie Cobbsis valid and unchanged. 19344a8ff31SArchie CobbsIf 19444a8ff31SArchie Cobbs.Fa addr 19544a8ff31SArchie Cobbsis 19644a8ff31SArchie Cobbs.Dv NULL , 19744a8ff31SArchie Cobbsthe 19844a8ff31SArchie Cobbs.Fn realloc 19944a8ff31SArchie Cobbsfunction behaves identically to 20044a8ff31SArchie Cobbs.Fn malloc 20144a8ff31SArchie Cobbsfor the specified size. 20244a8ff31SArchie Cobbs.Pp 20344a8ff31SArchie CobbsThe 20444a8ff31SArchie Cobbs.Fn reallocf 205c2f7105cSRuslan Ermilovfunction is identical to 206c2f7105cSRuslan Ermilov.Fn realloc 207c2f7105cSRuslan Ermilovexcept that it 20844a8ff31SArchie Cobbswill free the passed pointer when the requested memory cannot be allocated. 20944a8ff31SArchie Cobbs.Pp 2105d4bf057SVladimir KondratyevThe 2115d4bf057SVladimir Kondratyev.Fn malloc_usable_size 2125d4bf057SVladimir Kondratyevfunction returns the usable size of the allocation pointed to by 2135d4bf057SVladimir Kondratyev.Fa addr . 2145d4bf057SVladimir KondratyevThe return value may be larger than the size that was requested during 2155d4bf057SVladimir Kondratyevallocation. 2165d4bf057SVladimir Kondratyev.Pp 21788cf6634SMike PritchardUnlike its standard C library counterpart 21888cf6634SMike Pritchard.Pq Xr malloc 3 , 219c8185672SRuslan Ermilovthe kernel version takes two more arguments. 220c8185672SRuslan ErmilovThe 22188cf6634SMike Pritchard.Fa flags 22288cf6634SMike Pritchardargument further qualifies 223b74e63f2SRuslan Ermilov.Fn malloc Ns 's 22488cf6634SMike Pritchardoperational characteristics as follows: 225367f1374SMatthew Dillon.Bl -tag -width indent 2261921a06dSPoul-Henning Kamp.It Dv M_ZERO 2271921a06dSPoul-Henning KampCauses the allocated memory to be set to all zeros. 228986e5ec7SKip Macy.It Dv M_NODUMP 229986e5ec7SKip MacyFor allocations greater than page size, causes the allocated 230986e5ec7SKip Macymemory to be excluded from kernel core dumps. 23188cf6634SMike Pritchard.It Dv M_NOWAIT 23288cf6634SMike PritchardCauses 23344a8ff31SArchie Cobbs.Fn malloc , 23444a8ff31SArchie Cobbs.Fn realloc , 235c2f7105cSRuslan Ermilovand 23644a8ff31SArchie Cobbs.Fn reallocf 23788cf6634SMike Pritchardto return 23888cf6634SMike Pritchard.Dv NULL 23988cf6634SMike Pritchardif the request cannot be immediately fulfilled due to resource shortage. 24044a8ff31SArchie CobbsNote that 24144a8ff31SArchie Cobbs.Dv M_NOWAIT 24244a8ff31SArchie Cobbsis required when running in an interrupt context. 2431e73455bSTom Rhodes.It Dv M_WAITOK 244c8185672SRuslan ErmilovIndicates that it is OK to wait for resources. 245c8185672SRuslan ErmilovIf the request cannot be immediately fulfilled, the current process is put 246473e34ceSHartmut Brandtto sleep to wait for resources to be released by other processes. 247497ddd58SDag-Erling SmørgravThe 24844a8ff31SArchie Cobbs.Fn malloc , 249c02fc960SConrad Meyer.Fn mallocarray , 25044a8ff31SArchie Cobbs.Fn realloc , 25144a8ff31SArchie Cobbsand 25244a8ff31SArchie Cobbs.Fn reallocf 253497ddd58SDag-Erling Smørgravfunctions cannot return 254367f1374SMatthew Dillon.Dv NULL 255497ddd58SDag-Erling Smørgravif 256497ddd58SDag-Erling Smørgrav.Dv M_WAITOK 257497ddd58SDag-Erling Smørgravis specified. 2580a8edd1cSConrad MeyerIf the multiplication of 259fd91e076SKristof Provost.Fa nmemb 260fd91e076SKristof Provostand 261fd91e076SKristof Provost.Fa size 262c02fc960SConrad Meyerwould cause an integer overflow, the 263c02fc960SConrad Meyer.Fn mallocarray 264c02fc960SConrad Meyerfunction induces a panic. 265cc4a02e2SMatthew Dillon.It Dv M_USE_RESERVE 26696509a1fSAlan CoxIndicates that the system can use its reserve of memory to satisfy the 26796509a1fSAlan Coxrequest. 26896509a1fSAlan CoxThis option should only be used in combination with 26996509a1fSAlan Cox.Dv M_NOWAIT 27096509a1fSAlan Coxwhen an allocation failure cannot be tolerated by the caller without 27196509a1fSAlan Coxcatastrophic effects on the system. 27288cf6634SMike Pritchard.El 27388cf6634SMike Pritchard.Pp 274473e34ceSHartmut BrandtExactly one of either 275473e34ceSHartmut Brandt.Dv M_WAITOK 276473e34ceSHartmut Brandtor 277473e34ceSHartmut Brandt.Dv M_NOWAIT 278473e34ceSHartmut Brandtmust be specified. 279473e34ceSHartmut Brandt.Pp 28088cf6634SMike PritchardThe 28188cf6634SMike Pritchard.Fa type 2822a94e401SPoul-Henning Kampargument is used to perform statistics on memory usage, and for 2832a94e401SPoul-Henning Kampbasic sanity checks. 28473692bebSHiten PandyaIt can be used to identify multiple allocations. 2852a94e401SPoul-Henning KampThe statistics can be examined by 28688cf6634SMike Pritchard.Sq vmstat -m . 2872a94e401SPoul-Henning Kamp.Pp 2882a94e401SPoul-Henning KampA 2892a94e401SPoul-Henning Kamp.Fa type 290473e34ceSHartmut Brandtis defined using 291c8185672SRuslan Ermilov.Vt "struct malloc_type" 292473e34ceSHartmut Brandtvia the 293cc4a02e2SMatthew Dillon.Fn MALLOC_DECLARE 294cc4a02e2SMatthew Dillonand 295cc4a02e2SMatthew Dillon.Fn MALLOC_DEFINE 296cc4a02e2SMatthew Dillonmacros. 2972a94e401SPoul-Henning Kamp.Bd -literal -offset indent 2982a94e401SPoul-Henning Kamp/* sys/something/foo_extern.h */ 2992a94e401SPoul-Henning Kamp 300cc4a02e2SMatthew DillonMALLOC_DECLARE(M_FOOBUF); 3012a94e401SPoul-Henning Kamp 3022a94e401SPoul-Henning Kamp/* sys/something/foo_main.c */ 3032a94e401SPoul-Henning Kamp 304cc4a02e2SMatthew DillonMALLOC_DEFINE(M_FOOBUF, "foobuffers", "Buffers to foo data into the ether"); 3052a94e401SPoul-Henning Kamp 3062a94e401SPoul-Henning Kamp/* sys/something/foo_subr.c */ 3072a94e401SPoul-Henning Kamp 3083136363fSRuslan Ermilov\&... 309d14fdb79SKevin Lobuf = malloc(sizeof(*buf), M_FOOBUF, M_NOWAIT); 3102a94e401SPoul-Henning Kamp 311367f1374SMatthew Dillon.Ed 312473e34ceSHartmut Brandt.Pp 313473e34ceSHartmut BrandtIn order to use 314c8185672SRuslan Ermilov.Fn MALLOC_DEFINE , 315473e34ceSHartmut Brandtone must include 316fe08efe6SRuslan Ermilov.In sys/param.h 317473e34ceSHartmut Brandt(instead of 318fe08efe6SRuslan Ermilov.In sys/types.h ) 319473e34ceSHartmut Brandtand 320fe08efe6SRuslan Ermilov.In sys/kernel.h . 321eb74baf3SHartmut Brandt.Sh CONTEXT 322473e34ceSHartmut Brandt.Fn malloc , 323473e34ceSHartmut Brandt.Fn realloc 324473e34ceSHartmut Brandtand 325473e34ceSHartmut Brandt.Fn reallocf 326473e34ceSHartmut Brandtmay not be called from fast interrupts handlers. 327c8185672SRuslan ErmilovWhen called from threaded interrupts, 328c8185672SRuslan Ermilov.Fa flags 329473e34ceSHartmut Brandtmust contain 330473e34ceSHartmut Brandt.Dv M_NOWAIT . 331473e34ceSHartmut Brandt.Pp 332473e34ceSHartmut Brandt.Fn malloc , 333473e34ceSHartmut Brandt.Fn realloc 334473e34ceSHartmut Brandtand 335473e34ceSHartmut Brandt.Fn reallocf 336eb74baf3SHartmut Brandtmay sleep when called with 337eb74baf3SHartmut Brandt.Dv M_WAITOK . 338473e34ceSHartmut Brandt.Fn free 339eb74baf3SHartmut Brandtnever sleeps. 3401067a2baSJonathan T. LooneyHowever, 3411067a2baSJonathan T. Looney.Fn malloc , 3421067a2baSJonathan T. Looney.Fn realloc , 3431067a2baSJonathan T. Looney.Fn reallocf 3441067a2baSJonathan T. Looneyand 3451067a2baSJonathan T. Looney.Fn free 3461067a2baSJonathan T. Looneymay not be called in a critical section or while holding a spin lock. 34779525d59SAlfred Perlstein.Pp 34879525d59SAlfred PerlsteinAny calls to 34979525d59SAlfred Perlstein.Fn malloc 350473e34ceSHartmut Brandt(even with 351473e34ceSHartmut Brandt.Dv M_NOWAIT ) 35279525d59SAlfred Perlsteinor 35379525d59SAlfred Perlstein.Fn free 35479525d59SAlfred Perlsteinwhen holding a 35579525d59SAlfred Perlstein.Xr vnode 9 35679525d59SAlfred Perlsteininterlock, will cause a LOR (Lock Order Reversal) due to the 3572988974bSMike Pritchardintertwining of VM Objects and Vnodes. 358d4d112e3SJoel Dahl.Sh IMPLEMENTATION NOTES 359d4d112e3SJoel DahlThe memory allocator allocates memory in chunks that have size a power 360d4d112e3SJoel Dahlof two for requests up to the size of a page of memory. 361d4d112e3SJoel DahlFor larger requests, one or more pages is allocated. 362d4d112e3SJoel DahlWhile it should not be relied upon, this information may be useful for 363d4d112e3SJoel Dahloptimizing the efficiency of memory use. 3649cbda590SRuslan Ermilov.Sh RETURN VALUES 3659cbda590SRuslan ErmilovThe 3669cbda590SRuslan Ermilov.Fn malloc , 3679cbda590SRuslan Ermilov.Fn realloc , 3689cbda590SRuslan Ermilovand 3699cbda590SRuslan Ermilov.Fn reallocf 3709cbda590SRuslan Ermilovfunctions return a kernel virtual address that is suitably aligned for 3719cbda590SRuslan Ermilovstorage of any type of object, or 3729cbda590SRuslan Ermilov.Dv NULL 3739cbda590SRuslan Ermilovif the request could not be satisfied (implying that 3749cbda590SRuslan Ermilov.Dv M_NOWAIT 3759cbda590SRuslan Ermilovwas set). 37688cf6634SMike Pritchard.Sh DIAGNOSTICS 37788cf6634SMike PritchardA kernel compiled with the 378473e34ceSHartmut Brandt.Dv INVARIANTS 37943d1df33SAlexander Langerconfiguration option attempts to detect memory corruption caused by 38088cf6634SMike Pritchardsuch things as writing outside the allocated area and imbalanced calls to the 38188cf6634SMike Pritchard.Fn malloc 38288cf6634SMike Pritchardand 38388cf6634SMike Pritchard.Fn free 3841111b49cSSheldon Hearnfunctions. 3851111b49cSSheldon HearnFailing consistency checks will cause a panic or a system console 386473e34ceSHartmut Brandtmessage. 3879cbda590SRuslan Ermilov.Sh SEE ALSO 3889978bd99SMark Johnston.Xr numa 4 , 3899cbda590SRuslan Ermilov.Xr vmstat 8 , 3909cbda590SRuslan Ermilov.Xr contigmalloc 9 , 3919978bd99SMark Johnston.Xr domainset 9 , 392a3256b88SChristian Brueffer.Xr memguard 9 , 3939cbda590SRuslan Ermilov.Xr vnode 9 39474ca6a22SDavid E. O'Brien.Sh HISTORY 39574ca6a22SDavid E. O'Brien.Fn zfree 39674ca6a22SDavid E. O'Brienfirst appeared in 39774ca6a22SDavid E. O'Brien.Fx 13.0 . 398