freebsd-dev/sys/compat
Jean-Sébastien Pédron 208d02fd5d
linuxkpi: Define ZERO_OR_NULL_PTR() in <linux/slab.h>
On Linux, the `kmalloc()` family of functions returns a special value if
the size of the allocation is zero. This macro verifies if the pointer
is NULL (the allocation failed) or the size is 0 (the allocation was not
performed AFAIU). This special value can be passed to `kfree()`.

On FreeBSD, our `malloc(9)` functions don't return a special value for
0-size allocations. Therefore we can simply compare the result against
NULL.

Reviewed by:	manu
Approved by:	manu
Differential Revision:	https://reviews.freebsd.org/D37367
2022-11-11 21:03:25 +01:00
..
freebsd32 freebsd32: Make sendmsg match native ABI for unpadded final control message 2022-09-15 17:16:22 +01:00
ia32 Retire sv_transtrap 2022-05-20 14:54:03 +03:00
lindebugfs linuxkpi: drm-kmod debugfs support 2022-09-20 19:41:10 +02:00
linprocfs linprocfs: Add net/route. 2022-10-22 13:52:58 +03:00
linsysfs linsysfs: plug set-but-not-used vars. 2022-03-31 23:49:26 +03:00
linux linux(4): Fix get_robust_list() syscall return value. 2022-11-09 00:17:17 +03:00
linuxkpi linuxkpi: Define ZERO_OR_NULL_PTR() in <linux/slab.h> 2022-11-11 21:03:25 +01:00
x86bios pmap_unmapdev/bios: Accept a pointer instead of a vm_offset_t. 2022-09-22 15:08:52 -07:00