Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107859835
D45045.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
901 B
Referenced Files
None
Subscribers
None
D45045.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D45045: malloc(9): introduce M_NEVERFREED
Attached
Detach File
Event Timeline
Log In to Comment