Restructure source tree.
diff --git a/jemalloc/Makefile.in b/jemalloc/Makefile.in
index b946f8e..788fedc 100644
--- a/jemalloc/Makefile.in
+++ b/jemalloc/Makefile.in
@@ -11,13 +11,12 @@
CC := @CC@
# Configuration parameters.
-BINDIR := @BINDIR@
INCLUDEDIR := @INCLUDEDIR@
LIBDIR := @LIBDIR@
MANDIR := @MANDIR@
# Build parameters.
-CPPFLAGS := @CPPFLAGS@ -I@srcroot@src -I@objroot@src
+CPPFLAGS := @CPPFLAGS@ -I@srcroot@include -I@objroot@include
CFLAGS := @CFLAGS@ -fPIC -DPIC
ifeq (macho, @abi@)
CFLAGS += -dynamic
@@ -33,16 +32,14 @@
REV := 0
# Lists of files.
-CHDRS := @objroot@src/jemalloc@install_suffix@.h \
- @objroot@src/jemalloc_defs@install_suffix@.h
-CSRCS := @srcroot@src/jemalloc.c @srcroot@src/jemalloc_arena.c \
- @srcroot@src/jemalloc_base.c @srcroot@src/jemalloc_chunk.c \
- @srcroot@src/jemalloc_chunk_dss.c @srcroot@src/jemalloc_chunk_mmap.c \
- @srcroot@src/jemalloc_chunk_swap.c @srcroot@src/ckh.c \
- @srcroot@src/jemalloc_ctl.c @srcroot@src/jemalloc_extent.c \
- @srcroot@src/hash.c @srcroot@src/jemalloc_huge.c @srcroot@src/mb.c \
- @srcroot@src/jemalloc_mutex.c @srcroot@src/prof.c \
- @srcroot@src/jemalloc_stats.c @srcroot@src/jemalloc_tcache.c
+CHDRS := @objroot@include/jemalloc@install_suffix@.h \
+ @objroot@include/jemalloc_defs@install_suffix@.h
+CSRCS := @srcroot@src/jemalloc.c @srcroot@src/arena.c @srcroot@src/base.c \
+ @srcroot@src/chunk.c @srcroot@src/chunk_dss.c \
+ @srcroot@src/chunk_mmap.c @srcroot@src/chunk_swap.c @srcroot@src/ckh.c \
+ @srcroot@src/ctl.c @srcroot@src/extent.c @srcroot@src/hash.c \
+ @srcroot@src/huge.c @srcroot@src/mb.c @srcroot@src/mutex.c \
+ @srcroot@src/prof.c @srcroot@src/stats.c @srcroot@src/tcache.c
DSOS := @objroot@lib/libjemalloc@install_suffix@.so.$(REV) \
@objroot@lib/libjemalloc@install_suffix@.so \
@objroot@lib/libjemalloc@install_suffix@_pic.a
@@ -59,6 +56,7 @@
-include $(CSRCS:@srcroot@%.c=@objroot@%.d)
@objroot@src/%.o: @srcroot@src/%.c
+ @mkdir -p $(@D)
$(CC) $(CFLAGS) -c $(CPPFLAGS) -o $@ $<
@$(SHELL) -ec "$(CC) -MM $(CPPFLAGS) $< | sed \"s/\($(subst /,\/,$(notdir $(basename $@)))\)\.o\([ :]*\)/$(subst /,\/,$(strip $(dir $@)))\1.o \2/g\" > $(@:%.o=%.d)"
@@ -68,20 +66,11 @@
ln -sf libjemalloc@install_suffix@.so.$(REV) lib/libjemalloc@install_suffix@.so
ar crus @objroot@lib/libjemalloc@install_suffix@_pic.a $+
-@objroot@bin/%@install_suffix@: @objroot@src/%.o
- @mkdir -p $(@D)
- $(CC) -o $@ $< $(LDFLAGS) $(LIBS)
-
install:
- install -d $(BINDIR)
- @for b in $(BINS); do \
- echo "install -m 755 $$b $(BINDIR)"; \
- install -m 755 $$b $(BINDIR); \
-done
- install -d $(INCLUDEDIR)
+ install -d $(INCLUDEDIR)/jemalloc
@for h in $(CHDRS); do \
- echo "install -m 644 $$h $(INCLUDEDIR)"; \
- install -m 644 $$h $(INCLUDEDIR); \
+ echo "install -m 644 $$h $(INCLUDEDIR)/jemalloc"; \
+ install -m 644 $$h $(INCLUDEDIR)/jemalloc; \
done
install -d $(LIBDIR)
install -m 755 @objroot@lib/libjemalloc@install_suffix@.so.$(REV) $(LIBDIR)
@@ -96,9 +85,6 @@
check:
clean:
- rm -f $(BINS)
- rm -f $(BINS:@objroot@bin/%=@objroot@src/%.o)
- rm -f $(BINS:@objroot@bin/%=@objroot@src/%.d)
rm -f $(CSRCS:@srcroot@%.c=@objroot@%.o)
rm -f $(CSRCS:@srcroot@%.c=@objroot@%.d)
rm -f $(DSOS)
diff --git a/jemalloc/configure.ac b/jemalloc/configure.ac
index ac3f32b..5d03890 100644
--- a/jemalloc/configure.ac
+++ b/jemalloc/configure.ac
@@ -263,22 +263,22 @@
AC_SUBST([install_suffix])
cfgoutputs_in="Makefile doc/jemalloc.3.in"
-cfgoutputs_in="${cfgoutputs_in} src/jemalloc.h.in"
-cfgoutputs_in="${cfgoutputs_in} src/internal/jemalloc_internal.h.in"
+cfgoutputs_in="${cfgoutputs_in} include/jemalloc/jemalloc.h.in"
+cfgoutputs_in="${cfgoutputs_in} include/jemalloc/internal/jemalloc_internal.h.in"
cfgoutputs_out="Makefile doc/jemalloc${install_suffix}.3"
-cfgoutputs_out="${cfgoutputs_out} src/jemalloc${install_suffix}.h"
-cfgoutputs_out="${cfgoutputs_out} src/internal/jemalloc_internal.h"
+cfgoutputs_out="${cfgoutputs_out} include/jemalloc/jemalloc${install_suffix}.h"
+cfgoutputs_out="${cfgoutputs_out} include/jemalloc/internal/jemalloc_internal.h"
cfgoutputs_tup="Makefile doc/jemalloc${install_suffix}.3:doc/jemalloc.3.in"
-cfgoutputs_tup="${cfgoutputs_tup} src/jemalloc${install_suffix}.h:src/jemalloc.h.in"
-cfgoutputs_tup="${cfgoutputs_tup} src/internal/jemalloc_internal.h"
+cfgoutputs_tup="${cfgoutputs_tup} include/jemalloc/jemalloc${install_suffix}.h:include/jemalloc/jemalloc.h.in"
+cfgoutputs_tup="${cfgoutputs_tup} include/jemalloc/internal/jemalloc_internal.h"
-cfghdrs_in="src/jemalloc_defs.h.in"
+cfghdrs_in="include/jemalloc/jemalloc_defs.h.in"
-cfghdrs_out="src/jemalloc_defs${install_suffix}.h"
+cfghdrs_out="include/jemalloc/jemalloc_defs${install_suffix}.h"
-cfghdrs_tup="src/jemalloc_defs${install_suffix}.h:src/jemalloc_defs.h.in"
+cfghdrs_tup="include/jemalloc/jemalloc_defs${install_suffix}.h:include/jemalloc/jemalloc_defs.h.in"
dnl Do not compile with debugging by default.
AC_ARG_ENABLE([debug],
diff --git a/jemalloc/doc/jemalloc.3.in b/jemalloc/doc/jemalloc.3.in
index d314fb0..5c66458 100644
--- a/jemalloc/doc/jemalloc.3.in
+++ b/jemalloc/doc/jemalloc.3.in
@@ -57,7 +57,7 @@
.Sy libjemalloc@install_suffix@
.Sh SYNOPSIS
.In stdlib.h
-.In jemalloc@install_suffix@.h
+.In jemalloc/jemalloc@install_suffix@.h
.Ft void *
.Fn @jemalloc_prefix@malloc "size_t size"
.Ft void *
diff --git a/jemalloc/src/internal/jemalloc_arena.h b/jemalloc/include/jemalloc/internal/arena.h
similarity index 100%
rename from jemalloc/src/internal/jemalloc_arena.h
rename to jemalloc/include/jemalloc/internal/arena.h
diff --git a/jemalloc/src/internal/jemalloc_base.h b/jemalloc/include/jemalloc/internal/base.h
similarity index 100%
rename from jemalloc/src/internal/jemalloc_base.h
rename to jemalloc/include/jemalloc/internal/base.h
diff --git a/jemalloc/src/internal/jemalloc_chunk.h b/jemalloc/include/jemalloc/internal/chunk.h
similarity index 92%
rename from jemalloc/src/internal/jemalloc_chunk.h
rename to jemalloc/include/jemalloc/internal/chunk.h
index 00b2e1d..1f6abf7 100644
--- a/jemalloc/src/internal/jemalloc_chunk.h
+++ b/jemalloc/include/jemalloc/internal/chunk.h
@@ -56,6 +56,6 @@
#endif /* JEMALLOC_H_INLINES */
/******************************************************************************/
-#include "internal/jemalloc_chunk_swap.h"
-#include "internal/jemalloc_chunk_dss.h"
-#include "internal/jemalloc_chunk_mmap.h"
+#include "jemalloc/internal/chunk_swap.h"
+#include "jemalloc/internal/chunk_dss.h"
+#include "jemalloc/internal/chunk_mmap.h"
diff --git a/jemalloc/src/internal/jemalloc_chunk_dss.h b/jemalloc/include/jemalloc/internal/chunk_dss.h
similarity index 100%
rename from jemalloc/src/internal/jemalloc_chunk_dss.h
rename to jemalloc/include/jemalloc/internal/chunk_dss.h
diff --git a/jemalloc/src/internal/jemalloc_chunk_mmap.h b/jemalloc/include/jemalloc/internal/chunk_mmap.h
similarity index 100%
rename from jemalloc/src/internal/jemalloc_chunk_mmap.h
rename to jemalloc/include/jemalloc/internal/chunk_mmap.h
diff --git a/jemalloc/src/internal/jemalloc_chunk_swap.h b/jemalloc/include/jemalloc/internal/chunk_swap.h
similarity index 100%
rename from jemalloc/src/internal/jemalloc_chunk_swap.h
rename to jemalloc/include/jemalloc/internal/chunk_swap.h
diff --git a/jemalloc/src/internal/ckh.h b/jemalloc/include/jemalloc/internal/ckh.h
similarity index 100%
rename from jemalloc/src/internal/ckh.h
rename to jemalloc/include/jemalloc/internal/ckh.h
diff --git a/jemalloc/src/internal/jemalloc_ctl.h b/jemalloc/include/jemalloc/internal/ctl.h
similarity index 100%
rename from jemalloc/src/internal/jemalloc_ctl.h
rename to jemalloc/include/jemalloc/internal/ctl.h
diff --git a/jemalloc/src/internal/jemalloc_extent.h b/jemalloc/include/jemalloc/internal/extent.h
similarity index 100%
rename from jemalloc/src/internal/jemalloc_extent.h
rename to jemalloc/include/jemalloc/internal/extent.h
diff --git a/jemalloc/src/internal/hash.h b/jemalloc/include/jemalloc/internal/hash.h
similarity index 100%
rename from jemalloc/src/internal/hash.h
rename to jemalloc/include/jemalloc/internal/hash.h
diff --git a/jemalloc/src/internal/jemalloc_huge.h b/jemalloc/include/jemalloc/internal/huge.h
similarity index 100%
rename from jemalloc/src/internal/jemalloc_huge.h
rename to jemalloc/include/jemalloc/internal/huge.h
diff --git a/jemalloc/src/internal/jemalloc_internal.h.in b/jemalloc/include/jemalloc/internal/jemalloc_internal.h.in
similarity index 85%
rename from jemalloc/src/internal/jemalloc_internal.h.in
rename to jemalloc/include/jemalloc/internal/jemalloc_internal.h.in
index d35cdaf..f7721f8 100644
--- a/jemalloc/src/internal/jemalloc_internal.h.in
+++ b/jemalloc/include/jemalloc/internal/jemalloc_internal.h.in
@@ -31,9 +31,9 @@
#include <dlfcn.h>
#endif
-#include "internal/rb.h"
-#include "internal/qr.h"
-#include "internal/ql.h"
+#include "jemalloc/internal/rb.h"
+#include "jemalloc/internal/qr.h"
+#include "jemalloc/internal/ql.h"
extern void (*JEMALLOC_P(malloc_message))(void *w4opaque, const char *p1,
const char *p2, const char *p3, const char *p4);
@@ -169,39 +169,39 @@
#define PAGE_CEILING(s) \
(((s) + PAGE_MASK) & ~PAGE_MASK)
-#include "internal/prn.h"
-#include "internal/mb.h"
-#include "internal/ckh.h"
-#include "internal/jemalloc_stats.h"
-#include "internal/jemalloc_ctl.h"
-#include "internal/jemalloc_mutex.h"
-#include "internal/jemalloc_extent.h"
-#include "internal/jemalloc_arena.h"
-#include "internal/jemalloc_base.h"
-#include "internal/jemalloc_chunk.h"
-#include "internal/jemalloc_huge.h"
-#include "internal/jemalloc_tcache.h"
-#include "internal/hash.h"
-#include "internal/prof.h"
+#include "jemalloc/internal/prn.h"
+#include "jemalloc/internal/mb.h"
+#include "jemalloc/internal/ckh.h"
+#include "jemalloc/internal/stats.h"
+#include "jemalloc/internal/ctl.h"
+#include "jemalloc/internal/mutex.h"
+#include "jemalloc/internal/extent.h"
+#include "jemalloc/internal/arena.h"
+#include "jemalloc/internal/base.h"
+#include "jemalloc/internal/chunk.h"
+#include "jemalloc/internal/huge.h"
+#include "jemalloc/internal/tcache.h"
+#include "jemalloc/internal/hash.h"
+#include "jemalloc/internal/prof.h"
#undef JEMALLOC_H_TYPES
/******************************************************************************/
#define JEMALLOC_H_STRUCTS
-#include "internal/prn.h"
-#include "internal/mb.h"
-#include "internal/ckh.h"
-#include "internal/jemalloc_stats.h"
-#include "internal/jemalloc_ctl.h"
-#include "internal/jemalloc_mutex.h"
-#include "internal/jemalloc_extent.h"
-#include "internal/jemalloc_arena.h"
-#include "internal/jemalloc_base.h"
-#include "internal/jemalloc_chunk.h"
-#include "internal/jemalloc_huge.h"
-#include "internal/jemalloc_tcache.h"
-#include "internal/hash.h"
-#include "internal/prof.h"
+#include "jemalloc/internal/prn.h"
+#include "jemalloc/internal/mb.h"
+#include "jemalloc/internal/ckh.h"
+#include "jemalloc/internal/stats.h"
+#include "jemalloc/internal/ctl.h"
+#include "jemalloc/internal/mutex.h"
+#include "jemalloc/internal/extent.h"
+#include "jemalloc/internal/arena.h"
+#include "jemalloc/internal/base.h"
+#include "jemalloc/internal/chunk.h"
+#include "jemalloc/internal/huge.h"
+#include "jemalloc/internal/tcache.h"
+#include "jemalloc/internal/hash.h"
+#include "jemalloc/internal/prof.h"
#undef JEMALLOC_H_STRUCTS
/******************************************************************************/
@@ -250,35 +250,35 @@
arena_t *choose_arena_hard(void);
#endif
-#include "internal/prn.h"
-#include "internal/mb.h"
-#include "internal/ckh.h"
-#include "internal/jemalloc_stats.h"
-#include "internal/jemalloc_ctl.h"
-#include "internal/jemalloc_mutex.h"
-#include "internal/jemalloc_extent.h"
-#include "internal/jemalloc_arena.h"
-#include "internal/jemalloc_base.h"
-#include "internal/jemalloc_chunk.h"
-#include "internal/jemalloc_huge.h"
-#include "internal/jemalloc_tcache.h"
-#include "internal/hash.h"
-#include "internal/prof.h"
+#include "jemalloc/internal/prn.h"
+#include "jemalloc/internal/mb.h"
+#include "jemalloc/internal/ckh.h"
+#include "jemalloc/internal/stats.h"
+#include "jemalloc/internal/ctl.h"
+#include "jemalloc/internal/mutex.h"
+#include "jemalloc/internal/extent.h"
+#include "jemalloc/internal/arena.h"
+#include "jemalloc/internal/base.h"
+#include "jemalloc/internal/chunk.h"
+#include "jemalloc/internal/huge.h"
+#include "jemalloc/internal/tcache.h"
+#include "jemalloc/internal/hash.h"
+#include "jemalloc/internal/prof.h"
#undef JEMALLOC_H_EXTERNS
/******************************************************************************/
#define JEMALLOC_H_INLINES
-#include "internal/prn.h"
-#include "internal/mb.h"
-#include "internal/ckh.h"
-#include "internal/jemalloc_stats.h"
-#include "internal/jemalloc_ctl.h"
-#include "internal/jemalloc_mutex.h"
-#include "internal/jemalloc_extent.h"
-#include "internal/jemalloc_base.h"
-#include "internal/jemalloc_chunk.h"
-#include "internal/jemalloc_huge.h"
+#include "jemalloc/internal/prn.h"
+#include "jemalloc/internal/mb.h"
+#include "jemalloc/internal/ckh.h"
+#include "jemalloc/internal/stats.h"
+#include "jemalloc/internal/ctl.h"
+#include "jemalloc/internal/mutex.h"
+#include "jemalloc/internal/extent.h"
+#include "jemalloc/internal/base.h"
+#include "jemalloc/internal/chunk.h"
+#include "jemalloc/internal/huge.h"
#ifndef JEMALLOC_ENABLE_INLINE
void malloc_write4(const char *p1, const char *p2, const char *p3,
@@ -367,10 +367,10 @@
}
#endif
-#include "internal/jemalloc_tcache.h"
-#include "internal/jemalloc_arena.h"
-#include "internal/hash.h"
-#include "internal/prof.h"
+#include "jemalloc/internal/tcache.h"
+#include "jemalloc/internal/arena.h"
+#include "jemalloc/internal/hash.h"
+#include "jemalloc/internal/prof.h"
#ifndef JEMALLOC_ENABLE_INLINE
void *imalloc(size_t size);
diff --git a/jemalloc/src/internal/mb.h b/jemalloc/include/jemalloc/internal/mb.h
similarity index 100%
rename from jemalloc/src/internal/mb.h
rename to jemalloc/include/jemalloc/internal/mb.h
diff --git a/jemalloc/src/internal/jemalloc_mutex.h b/jemalloc/include/jemalloc/internal/mutex.h
similarity index 100%
rename from jemalloc/src/internal/jemalloc_mutex.h
rename to jemalloc/include/jemalloc/internal/mutex.h
diff --git a/jemalloc/src/internal/prn.h b/jemalloc/include/jemalloc/internal/prn.h
similarity index 100%
rename from jemalloc/src/internal/prn.h
rename to jemalloc/include/jemalloc/internal/prn.h
diff --git a/jemalloc/src/internal/prof.h b/jemalloc/include/jemalloc/internal/prof.h
similarity index 100%
rename from jemalloc/src/internal/prof.h
rename to jemalloc/include/jemalloc/internal/prof.h
diff --git a/jemalloc/src/internal/ql.h b/jemalloc/include/jemalloc/internal/ql.h
similarity index 100%
rename from jemalloc/src/internal/ql.h
rename to jemalloc/include/jemalloc/internal/ql.h
diff --git a/jemalloc/src/internal/qr.h b/jemalloc/include/jemalloc/internal/qr.h
similarity index 100%
rename from jemalloc/src/internal/qr.h
rename to jemalloc/include/jemalloc/internal/qr.h
diff --git a/jemalloc/src/internal/rb.h b/jemalloc/include/jemalloc/internal/rb.h
similarity index 100%
rename from jemalloc/src/internal/rb.h
rename to jemalloc/include/jemalloc/internal/rb.h
diff --git a/jemalloc/src/internal/jemalloc_stats.h b/jemalloc/include/jemalloc/internal/stats.h
similarity index 100%
rename from jemalloc/src/internal/jemalloc_stats.h
rename to jemalloc/include/jemalloc/internal/stats.h
diff --git a/jemalloc/src/internal/jemalloc_tcache.h b/jemalloc/include/jemalloc/internal/tcache.h
similarity index 100%
rename from jemalloc/src/internal/jemalloc_tcache.h
rename to jemalloc/include/jemalloc/internal/tcache.h
diff --git a/jemalloc/src/jemalloc.h.in b/jemalloc/include/jemalloc/jemalloc.h.in
similarity index 100%
rename from jemalloc/src/jemalloc.h.in
rename to jemalloc/include/jemalloc/jemalloc.h.in
diff --git a/jemalloc/src/jemalloc_defs.h.in b/jemalloc/include/jemalloc/jemalloc_defs.h.in
similarity index 100%
rename from jemalloc/src/jemalloc_defs.h.in
rename to jemalloc/include/jemalloc/jemalloc_defs.h.in
diff --git a/jemalloc/src/jemalloc_arena.c b/jemalloc/src/arena.c
similarity index 99%
rename from jemalloc/src/jemalloc_arena.c
rename to jemalloc/src/arena.c
index c3dc382..53d703b 100644
--- a/jemalloc/src/jemalloc_arena.c
+++ b/jemalloc/src/arena.c
@@ -1,5 +1,5 @@
#define JEMALLOC_ARENA_C_
-#include "internal/jemalloc_internal.h"
+#include "jemalloc/internal/jemalloc_internal.h"
/******************************************************************************/
/* Data. */
diff --git a/jemalloc/src/jemalloc_base.c b/jemalloc/src/base.c
similarity index 97%
rename from jemalloc/src/jemalloc_base.c
rename to jemalloc/src/base.c
index 607f94a..605197e 100644
--- a/jemalloc/src/jemalloc_base.c
+++ b/jemalloc/src/base.c
@@ -1,5 +1,5 @@
#define JEMALLOC_BASE_C_
-#include "internal/jemalloc_internal.h"
+#include "jemalloc/internal/jemalloc_internal.h"
/******************************************************************************/
/* Data. */
diff --git a/jemalloc/src/jemalloc_chunk.c b/jemalloc/src/chunk.c
similarity index 98%
rename from jemalloc/src/jemalloc_chunk.c
rename to jemalloc/src/chunk.c
index 2554387..e6e3bcd 100644
--- a/jemalloc/src/jemalloc_chunk.c
+++ b/jemalloc/src/chunk.c
@@ -1,5 +1,5 @@
#define JEMALLOC_CHUNK_C_
-#include "internal/jemalloc_internal.h"
+#include "jemalloc/internal/jemalloc_internal.h"
/******************************************************************************/
/* Data. */
diff --git a/jemalloc/src/jemalloc_chunk_dss.c b/jemalloc/src/chunk_dss.c
similarity index 99%
rename from jemalloc/src/jemalloc_chunk_dss.c
rename to jemalloc/src/chunk_dss.c
index e38b876..d9bd63c 100644
--- a/jemalloc/src/jemalloc_chunk_dss.c
+++ b/jemalloc/src/chunk_dss.c
@@ -1,5 +1,5 @@
#define JEMALLOC_CHUNK_DSS_C_
-#include "internal/jemalloc_internal.h"
+#include "jemalloc/internal/jemalloc_internal.h"
#ifdef JEMALLOC_DSS
/******************************************************************************/
/* Data. */
diff --git a/jemalloc/src/jemalloc_chunk_mmap.c b/jemalloc/src/chunk_mmap.c
similarity index 98%
rename from jemalloc/src/jemalloc_chunk_mmap.c
rename to jemalloc/src/chunk_mmap.c
index d5702f2..4ab9f3d 100644
--- a/jemalloc/src/jemalloc_chunk_mmap.c
+++ b/jemalloc/src/chunk_mmap.c
@@ -1,5 +1,5 @@
#define JEMALLOC_CHUNK_MMAP_C_
-#include "internal/jemalloc_internal.h"
+#include "jemalloc/internal/jemalloc_internal.h"
/******************************************************************************/
/* Data. */
diff --git a/jemalloc/src/jemalloc_chunk_swap.c b/jemalloc/src/chunk_swap.c
similarity index 99%
rename from jemalloc/src/jemalloc_chunk_swap.c
rename to jemalloc/src/chunk_swap.c
index c185d43..679633c 100644
--- a/jemalloc/src/jemalloc_chunk_swap.c
+++ b/jemalloc/src/chunk_swap.c
@@ -1,5 +1,5 @@
#define JEMALLOC_CHUNK_SWAP_C_
-#include "internal/jemalloc_internal.h"
+#include "jemalloc/internal/jemalloc_internal.h"
#ifdef JEMALLOC_SWAP
/******************************************************************************/
/* Data. */
diff --git a/jemalloc/src/ckh.c b/jemalloc/src/ckh.c
index c299279..fd234a4 100644
--- a/jemalloc/src/ckh.c
+++ b/jemalloc/src/ckh.c
@@ -35,7 +35,7 @@
*
******************************************************************************/
#define CKH_C_
-#include "internal/jemalloc_internal.h"
+#include "jemalloc/internal/jemalloc_internal.h"
/******************************************************************************/
/* Function prototypes for non-inline static functions. */
diff --git a/jemalloc/src/jemalloc_ctl.c b/jemalloc/src/ctl.c
similarity index 99%
rename from jemalloc/src/jemalloc_ctl.c
rename to jemalloc/src/ctl.c
index 9775f72..55ad2a7 100644
--- a/jemalloc/src/jemalloc_ctl.c
+++ b/jemalloc/src/ctl.c
@@ -1,5 +1,5 @@
#define JEMALLOC_CTL_C_
-#include "internal/jemalloc_internal.h"
+#include "jemalloc/internal/jemalloc_internal.h"
/******************************************************************************/
/* Data. */
diff --git a/jemalloc/src/jemalloc_extent.c b/jemalloc/src/extent.c
similarity index 95%
rename from jemalloc/src/jemalloc_extent.c
rename to jemalloc/src/extent.c
index 1aa96a7..7c3ac7a 100644
--- a/jemalloc/src/jemalloc_extent.c
+++ b/jemalloc/src/extent.c
@@ -1,5 +1,5 @@
#define JEMALLOC_EXTENT_C_
-#include "internal/jemalloc_internal.h"
+#include "jemalloc/internal/jemalloc_internal.h"
/******************************************************************************/
diff --git a/jemalloc/src/hash.c b/jemalloc/src/hash.c
index 6110c7e..6a13d7a 100644
--- a/jemalloc/src/hash.c
+++ b/jemalloc/src/hash.c
@@ -1,2 +1,2 @@
#define HASH_C_
-#include "internal/jemalloc_internal.h"
+#include "jemalloc/internal/jemalloc_internal.h"
diff --git a/jemalloc/src/jemalloc_huge.c b/jemalloc/src/huge.c
similarity index 98%
rename from jemalloc/src/jemalloc_huge.c
rename to jemalloc/src/huge.c
index 2936cdd..d35aa5c 100644
--- a/jemalloc/src/jemalloc_huge.c
+++ b/jemalloc/src/huge.c
@@ -1,5 +1,5 @@
#define JEMALLOC_HUGE_C_
-#include "internal/jemalloc_internal.h"
+#include "jemalloc/internal/jemalloc_internal.h"
/******************************************************************************/
/* Data. */
diff --git a/jemalloc/src/jemalloc.c b/jemalloc/src/jemalloc.c
index dfff742..22401d1 100644
--- a/jemalloc/src/jemalloc.c
+++ b/jemalloc/src/jemalloc.c
@@ -90,7 +90,7 @@
*/
#define JEMALLOC_C_
-#include "internal/jemalloc_internal.h"
+#include "jemalloc/internal/jemalloc_internal.h"
/******************************************************************************/
/* Data. */
diff --git a/jemalloc/src/mb.c b/jemalloc/src/mb.c
index 01665d1..30a1a2e 100644
--- a/jemalloc/src/mb.c
+++ b/jemalloc/src/mb.c
@@ -1,2 +1,2 @@
#define MB_C_
-#include "internal/jemalloc_internal.h"
+#include "jemalloc/internal/jemalloc_internal.h"
diff --git a/jemalloc/src/jemalloc_mutex.c b/jemalloc/src/mutex.c
similarity index 96%
rename from jemalloc/src/jemalloc_mutex.c
rename to jemalloc/src/mutex.c
index 5e3cab3..7425027 100644
--- a/jemalloc/src/jemalloc_mutex.c
+++ b/jemalloc/src/mutex.c
@@ -1,5 +1,5 @@
#define JEMALLOC_MUTEX_C_
-#include "internal/jemalloc_internal.h"
+#include "jemalloc/internal/jemalloc_internal.h"
/******************************************************************************/
/* Data. */
diff --git a/jemalloc/src/prof.c b/jemalloc/src/prof.c
index 7e1d967..edaa7fb 100644
--- a/jemalloc/src/prof.c
+++ b/jemalloc/src/prof.c
@@ -1,5 +1,5 @@
#define JEMALLOC_PROF_C_
-#include "internal/jemalloc_internal.h"
+#include "jemalloc/internal/jemalloc_internal.h"
#ifdef JEMALLOC_PROF
/******************************************************************************/
diff --git a/jemalloc/src/jemalloc_stats.c b/jemalloc/src/stats.c
similarity index 99%
rename from jemalloc/src/jemalloc_stats.c
rename to jemalloc/src/stats.c
index 7a7f111..9798458 100644
--- a/jemalloc/src/jemalloc_stats.c
+++ b/jemalloc/src/stats.c
@@ -1,5 +1,5 @@
#define JEMALLOC_STATS_C_
-#include "internal/jemalloc_internal.h"
+#include "jemalloc/internal/jemalloc_internal.h"
#define CTL_GET(n, v, t) do { \
size_t sz = sizeof(t); \
diff --git a/jemalloc/src/jemalloc_tcache.c b/jemalloc/src/tcache.c
similarity index 99%
rename from jemalloc/src/jemalloc_tcache.c
rename to jemalloc/src/tcache.c
index c54d54e..d64ebac 100644
--- a/jemalloc/src/jemalloc_tcache.c
+++ b/jemalloc/src/tcache.c
@@ -1,5 +1,5 @@
#define JEMALLOC_TCACHE_C_
-#include "internal/jemalloc_internal.h"
+#include "jemalloc/internal/jemalloc_internal.h"
#ifdef JEMALLOC_TCACHE
/******************************************************************************/
/* Data. */