Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/jemalloc Ensure that percpu_arena_update is rea...
details: https://anonhg.NetBSD.org/src/rev/e929d6e83c61
branches: trunk
changeset: 462200:e929d6e83c61
user: joerg <joerg%NetBSD.org@localhost>
date: Sat Jul 27 23:43:18 2019 +0000
description:
Ensure that percpu_arena_update is really dead if it shouldn't work and
really alive otherwise.
diffstat:
external/bsd/jemalloc/dist/include/jemalloc/internal/arena_inlines_a.h | 11 ++++++++-
external/bsd/jemalloc/include/jemalloc/internal/arena_inlines_a.h | 11 ++++++++-
2 files changed, 18 insertions(+), 4 deletions(-)
diffs (56 lines):
diff -r d9ae76ac6524 -r e929d6e83c61 external/bsd/jemalloc/dist/include/jemalloc/internal/arena_inlines_a.h
--- a/external/bsd/jemalloc/dist/include/jemalloc/internal/arena_inlines_a.h Sat Jul 27 23:33:09 2019 +0000
+++ b/external/bsd/jemalloc/dist/include/jemalloc/internal/arena_inlines_a.h Sat Jul 27 23:43:18 2019 +0000
@@ -32,9 +32,10 @@
return prof_accum_add(tsdn, &arena->prof_accum, accumbytes);
}
-static JEMALLOC_NORETURN inline void
+#ifdef JEMALLOC_PERCPU_ARENA
+static
+inline void
percpu_arena_update(tsd_t *tsd, unsigned cpu) {
- assert(have_percpu_arena);
arena_t *oldarena = tsd_arena_get(tsd);
assert(oldarena != NULL);
unsigned oldind = arena_ind_get(oldarena);
@@ -53,5 +54,11 @@
}
}
}
+#else
+static JEMALLOC_NORETURN inline void
+percpu_arena_update(tsd_t *tsd, unsigned cpu) {
+ abort();
+}
+#endif
#endif /* JEMALLOC_INTERNAL_ARENA_INLINES_A_H */
diff -r d9ae76ac6524 -r e929d6e83c61 external/bsd/jemalloc/include/jemalloc/internal/arena_inlines_a.h
--- a/external/bsd/jemalloc/include/jemalloc/internal/arena_inlines_a.h Sat Jul 27 23:33:09 2019 +0000
+++ b/external/bsd/jemalloc/include/jemalloc/internal/arena_inlines_a.h Sat Jul 27 23:43:18 2019 +0000
@@ -32,9 +32,10 @@
return prof_accum_add(tsdn, &arena->prof_accum, accumbytes);
}
-static JEMALLOC_NORETURN inline void
+#ifdef JEMALLOC_PERCPU_ARENA
+static
+inline void
percpu_arena_update(tsd_t *tsd, unsigned cpu) {
- assert(have_percpu_arena);
arena_t *oldarena = tsd_arena_get(tsd);
assert(oldarena != NULL);
unsigned oldind = arena_ind_get(oldarena);
@@ -53,5 +54,11 @@
}
}
}
+#else
+static JEMALLOC_NORETURN inline void
+percpu_arena_update(tsd_t *tsd, unsigned cpu) {
+ abort();
+}
+#endif
#endif /* JEMALLOC_INTERNAL_ARENA_INLINES_A_H */
Home |
Main Index |
Thread Index |
Old Index