]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
malloc: move malloc_type_internal into malloc_type
authormjg <mjg@FreeBSD.org>
Fri, 6 Nov 2020 21:33:59 +0000 (21:33 +0000)
committermjg <mjg@FreeBSD.org>
Fri, 6 Nov 2020 21:33:59 +0000 (21:33 +0000)
commitbf8d89a3755487b0e149baf6e0b27b0e9d1ce1e7
tree3a11e336ea855d9c76b61e52874a8f708f4f0b8f
parent2f331e493f5d596d24fe284c2810e488d5e0d397
malloc: move malloc_type_internal into malloc_type

According to code comments the original motivation was to allow for
malloc_type_internal changes without ABI breakage. This can be trivially
accomplished by providing spare fields and versioning the struct, as
implemented in the patch below.

The upshots are one less memory indirection on each alloc and disappearance
of mt_zone.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D27104
lib/libmemstat/memstat_malloc.c
sys/cddl/dev/dtmalloc/dtmalloc.c
sys/kern/kern_malloc.c
sys/sys/malloc.h
sys/sys/param.h