[PATCH 16/19] Remove #includes in tests
Mike Hommey
mh+jemalloc at glandium.org
Thu Apr 19 09:28:03 PDT 2012
From: Mike Hommey <mh at glandium.org>
Since we're now including jemalloc_internal.h, all the required headers
are already pulled. This will avoid having to fiddle with headers that can
or can't be used with MSVC. Also, now that we use malloc_printf, we can use
util.h's definition of assert instead of assert.h's.
---
test/aligned_alloc.c | 7 -------
test/allocated.c | 8 --------
test/allocm.c | 4 ----
test/bitmap.c | 6 ------
test/mremap.c | 6 ------
test/posix_memalign.c | 7 -------
test/rallocm.c | 6 ------
test/thread_arena.c | 5 -----
test/thread_tcache_enabled.c | 6 ------
9 files changed, 55 deletions(-)
diff --git a/test/aligned_alloc.c b/test/aligned_alloc.c
index 81b8f93..81caa0a 100644
--- a/test/aligned_alloc.c
+++ b/test/aligned_alloc.c
@@ -1,10 +1,3 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-
#define JEMALLOC_MANGLE
#include "jemalloc_test.h"
diff --git a/test/allocated.c b/test/allocated.c
index 3f889f4..b29f2bc 100644
--- a/test/allocated.c
+++ b/test/allocated.c
@@ -1,11 +1,3 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <stdbool.h>
-#include <assert.h>
-#include <errno.h>
-#include <string.h>
-
#define JEMALLOC_MANGLE
#include "jemalloc_test.h"
diff --git a/test/allocm.c b/test/allocm.c
index c6bc6f8..80be673 100644
--- a/test/allocm.c
+++ b/test/allocm.c
@@ -1,7 +1,3 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-
#define JEMALLOC_MANGLE
#include "jemalloc_test.h"
diff --git a/test/bitmap.c b/test/bitmap.c
index ee9b1ec..ff50ecb 100644
--- a/test/bitmap.c
+++ b/test/bitmap.c
@@ -1,12 +1,6 @@
#define JEMALLOC_MANGLE
#include "jemalloc_test.h"
-/*
- * Avoid using the assert() from jemalloc_internal.h, since it requires
- * internal libjemalloc functionality.
- * */
-#include <assert.h>
-
#if (LG_BITMAP_MAXBITS > 12)
# define MAXBITS 4500
#else
diff --git a/test/mremap.c b/test/mremap.c
index 84c0349..47efa7c 100644
--- a/test/mremap.c
+++ b/test/mremap.c
@@ -1,9 +1,3 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <errno.h>
-#include <string.h>
-
#define JEMALLOC_MANGLE
#include "jemalloc_test.h"
diff --git a/test/posix_memalign.c b/test/posix_memalign.c
index e1302df..2185bcf 100644
--- a/test/posix_memalign.c
+++ b/test/posix_memalign.c
@@ -1,10 +1,3 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-
#define JEMALLOC_MANGLE
#include "jemalloc_test.h"
diff --git a/test/rallocm.c b/test/rallocm.c
index f2a4770..c5dedf4 100644
--- a/test/rallocm.c
+++ b/test/rallocm.c
@@ -1,9 +1,3 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <assert.h>
-
#define JEMALLOC_MANGLE
#include "jemalloc_test.h"
diff --git a/test/thread_arena.c b/test/thread_arena.c
index 9835428..2020d99 100644
--- a/test/thread_arena.c
+++ b/test/thread_arena.c
@@ -1,8 +1,3 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
#define JEMALLOC_MANGLE
#include "jemalloc_test.h"
diff --git a/test/thread_tcache_enabled.c b/test/thread_tcache_enabled.c
index e1cba43..150a224 100644
--- a/test/thread_tcache_enabled.c
+++ b/test/thread_tcache_enabled.c
@@ -1,9 +1,3 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdbool.h>
-#include <assert.h>
-#include <errno.h>
-
#define JEMALLOC_MANGLE
#include "jemalloc_test.h"
--
1.7.10
More information about the jemalloc-discuss
mailing list