]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
LinuxKPI: Implement ksize() function.
authorVladimir Kondratyev <wulf@FreeBSD.org>
Sat, 29 Aug 2020 19:26:31 +0000 (19:26 +0000)
committerVladimir Kondratyev <wulf@FreeBSD.org>
Sat, 29 Aug 2020 19:26:31 +0000 (19:26 +0000)
commit5d4bf0578f0c665f2f28f8ca0970a3368fad6e7b
treef1059fc907da1517fdad1552ff15f3befab2308e
parent8ea469ebbb7eab772f2968179f29c12b1cd734e1
LinuxKPI: Implement ksize() function.

In Linux, ksize() gets the actual amount of memory allocated for a given
object. This commit adds malloc_usable_size() to FreeBSD KPI which does
the same. It also maps LinuxKPI ksize() to newly created function.

ksize() function is used by drm-kmod.

Reviewed by: hselasky, kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D26215
share/man/man9/malloc.9
sys/compat/linuxkpi/common/include/linux/slab.h
sys/kern/kern_malloc.c
sys/sys/malloc.h
sys/vm/memguard.c
sys/vm/memguard.h