Page MenuHomeFreeBSD

D45045.diff
No OneTemporary

D45045.diff

diff --git a/sys/sys/malloc.h b/sys/sys/malloc.h
--- a/sys/sys/malloc.h
+++ b/sys/sys/malloc.h
@@ -60,8 +60,9 @@
#define M_BESTFIT 0x2000 /* only for vmem, low fragmentation */
#define M_EXEC 0x4000 /* allocate executable space */
#define M_NEXTFIT 0x8000 /* only for vmem, follow cursor */
+#define M_NEVERFREED 0x10000 /* chunk will never get freed */
-#define M_VERSION 2020110501
+#define M_VERSION 2024073001
/*
* Two malloc type structures are present: malloc_type, which is used by a
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c
--- a/sys/vm/uma_core.c
+++ b/sys/vm/uma_core.c
@@ -1791,6 +1791,9 @@
if (keg->uk_flags & UMA_ZONE_NODUMP)
aflags |= M_NODUMP;
+ if (keg->uk_flags & UMA_ZONE_NOFREE)
+ aflags |= M_NEVERFREED;
+
/* zone is passed for legacy reasons. */
size = keg->uk_ppera * PAGE_SIZE;
mem = keg->uk_allocf(zone, size, domain, &sflags, aflags);

File Metadata

Mime Type
text/plain
Expires
Sun, Jan 19, 7:09 PM (18 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15955797
Default Alt Text
D45045.diff (901 B)

Event Timeline