]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
malloc: move malloc_type_internal into malloc_type
authorMateusz Guzik <mjg@FreeBSD.org>
Fri, 6 Nov 2020 21:33:59 +0000 (21:33 +0000)
committerMateusz Guzik <mjg@FreeBSD.org>
Fri, 6 Nov 2020 21:33:59 +0000 (21:33 +0000)
commitbdcc2226441ed191f614ed854f6ea7cb06986cd2
tree3a11e336ea855d9c76b61e52874a8f708f4f0b8f
parent0244378f43a60cf7f52154014c2f64c34e2c77ad
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