Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108582210
D46686.id143533.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D46686.id143533.diff
View Options
diff --git a/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h b/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h
--- a/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h
+++ b/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h
@@ -39,7 +39,11 @@
# define JEMALLOC_TLS_MODEL __attribute__((tls_model("initial-exec")))
#endif
#ifdef __amd64__
+#ifdef _USE_LG_VADDR_WIDE
+# define LG_VADDR 64
+#else
# define LG_VADDR 48
+#endif
# define LG_SIZEOF_PTR 3
# define JEMALLOC_TLS_MODEL __attribute__((tls_model("initial-exec")))
#endif
diff --git a/lib/libc/stdlib/malloc/jemalloc/Makefile.inc b/lib/libc/stdlib/malloc/jemalloc/Makefile.inc
--- a/lib/libc/stdlib/malloc/jemalloc/Makefile.inc
+++ b/lib/libc/stdlib/malloc/jemalloc/Makefile.inc
@@ -5,6 +5,9 @@
test_hooks.c ticker.c tsd.c witness.c
CFLAGS+=-I${SRCTOP}/contrib/jemalloc/include
+.if ${MK_JEMALLOC_LG_VADDR_WIDE} != no
+CFLAGS+=-D_USE_LG_VADDR_WIDE
+.endif
.for src in ${JEMALLOCSRCS}
MISRCS+=jemalloc_${src}
diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk
--- a/share/mk/src.opts.mk
+++ b/share/mk/src.opts.mk
@@ -116,6 +116,7 @@
IPFW \
ISCSI \
JAIL \
+ JEMALLOC_LG_VADDR_WIDE \
KDUMP \
KVM \
LDNS \
diff --git a/tools/build/options/WITH_JEMALLOC_LG_VADDR_WIDE b/tools/build/options/WITH_JEMALLOC_LG_VADDR_WIDE
new file mode 100644
--- /dev/null
+++ b/tools/build/options/WITH_JEMALLOC_LG_VADDR_WIDE
@@ -0,0 +1,4 @@
+Allow programs to use more than 48 address bits on amd64.
+Required for LA57 mode.
+Disabling this option might result in a slight reduction in memory
+consumption for jemalloc metadata.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 27, 2:53 PM (4 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16199534
Default Alt Text
D46686.id143533.diff (1 KB)
Attached To
Mode
D46686: jemalloc: set LG_VADDR to 64 on amd64
Attached
Detach File
Event Timeline
Log In to Comment