Module Name: src
Committed By: christos
Date: Tue Mar 5 22:39:21 UTC 2019
Modified Files:
src/external/bsd/jemalloc/include/jemalloc/internal:
jemalloc_internal_defs.h
Log Message:
Add some XXX for things I need to fix later, and fix some of the hard-coding.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h
diff -u src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.1 src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.2
--- src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.1 Mon Mar 4 12:25:09 2019
+++ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h Tue Mar 5 17:39:21 2019
@@ -33,9 +33,12 @@
* Hyper-threaded CPUs may need a special instruction inside spin loops in
* order to yield to another virtual CPU.
*/
+#ifdef __x86_64__
+/* XXX: I will take care of this later */
#define CPU_SPINWAIT __asm__ volatile("pause")
/* 1 if CPU_SPINWAIT is defined, 0 otherwise. */
#define HAVE_CPU_SPINWAIT 1
+#endif
/*
* Number of significant bits in virtual addresses. This may be less than the
@@ -43,6 +46,7 @@
* bits are the same as bit 47.
*/
#ifdef _LP64
+/* XXX: I will take care of this later */
#define LG_VADDR 48
#else
#define LG_VADDR 32
@@ -195,7 +199,8 @@
/* #undef LG_QUANTUM */
/* One page is 2^LG_PAGE bytes. */
-#define LG_PAGE 12
+#include <machine/vmparam.h>
+#define LG_PAGE PAGE_SHIFT
/*
* One huge page is 2^LG_HUGEPAGE bytes. Note that this is defined even if the
@@ -311,7 +316,10 @@
#define JEMALLOC_HAS_RESTRICT 1
/* For use by hash code. */
-/* #undef JEMALLOC_BIG_ENDIAN */
+#include <sys/endian.h>
+#if _BYTE_ORDER == _BIG_ENDIAN
+#define JEMALLOC_BIG_ENDIAN 1
+#endif
/* sizeof(int) == 2^LG_SIZEOF_INT. */
#define LG_SIZEOF_INT 2