opnsense-src/lib/libc
Brooks Davis c6e072f15c memfd_create: don't allocate heap memory
Rather than calling calloc() to allocate space for a page size array to
pass to getpagesizes(), just follow the getpagesizes() implementation
and allocate MAXPAGESIZES elements on the stack.  This avoids the need
for the allocation.

While this does mean that a new libc is required to take advantage of a
new huge page size, that was already true due to getpagesizes() using a
static buffer of MAXPAGESIZES elements.

Reviewed by:	kevans, imp, emaste
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D42710

(cherry picked from commit c96772227b7dfcaf4eec4d07acb5c916643aca3a)
2023-12-21 18:13:19 +00:00
..
aarch64 libc: centralize a few numeric symbols 2023-12-13 22:08:14 +00:00
amd64 libc: centralize a few numeric symbols 2023-12-13 22:08:14 +00:00
arm libc: centralize a few numeric symbols 2023-12-13 22:08:14 +00:00
capability libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
compat-43 libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
csu libc: Purge unneeded cdefs.h 2023-11-26 21:20:09 -07:00
db libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
gdtoa libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
gen memfd_create: don't allocate heap memory 2023-12-21 18:13:19 +00:00
gmon libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
i386 libc: centralize a few numeric symbols 2023-12-13 22:08:14 +00:00
iconv libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
include libc: Purge unneeded cdefs.h 2023-11-26 21:20:09 -07:00
inet libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
isc libc: Purge unneeded cdefs.h 2023-11-26 21:20:09 -07:00
locale libc: remove some obsolete VCS data 2023-12-13 23:08:50 +00:00
md Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
nameser libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
net libc: centralize ntoh symbols 2023-12-13 22:08:14 +00:00
nls libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
posix1e libc: correct some memory leaks in acl_to_text(3) and acl_to_text_np(3) 2023-12-20 10:29:55 +02:00
powerpc libc: centralize a few numeric symbols 2023-12-13 22:08:14 +00:00
powerpc64 libc: centralize a few numeric symbols 2023-12-13 22:08:14 +00:00
powerpcspe libc/<arch>/sys/Makefile.inc: remove cruft 2023-12-13 22:08:13 +00:00
quad libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
regex libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
resolv libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
riscv libc: centralize a few numeric symbols 2023-12-13 22:08:14 +00:00
rpc libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
secure libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
softfloat libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
stdio libc: remove some obsolete VCS data 2023-12-13 23:08:50 +00:00
stdlib strfmon.c: Use the restrict keyword directly 2023-12-16 06:17:51 +02:00
stdtime libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
string libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
sys memfd_create: move implementation to libc/gen 2023-12-21 18:13:18 +00:00
tests libc: Purge unneeded cdefs.h 2023-11-26 21:20:09 -07:00
uuid libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
x86 libc/<arch>/sys/Makefile.inc: remove cruft 2023-12-13 22:08:13 +00:00
xdr libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
yp libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
libc.ldscript Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:29 -06:00
libc_nossp.ldscript Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:29 -06:00
Makefile lib{c,lzma,z}: remove -DSYMBOL_VERSIONING from CFLAGS 2023-12-13 22:08:13 +00:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.depend.options Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Versions.def Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00