Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix dlmalloc speed regression

  • Loading branch information...
commit 06354eda6092add55034c692bd65734a61083e8b 1 parent 17cc630
@kripken authored
Showing with 5 additions and 3 deletions.
  1. +3 −1 src/dlmalloc.c
  2. +2 −2 tests/runner.py
View
4 src/dlmalloc.c
@@ -1,7 +1,9 @@
+
#define __THROW
#define __attribute_malloc__
#define __wur
+
/*
This is a version (aka dlmalloc) of malloc/free/realloc written by
Doug Lea and released to the public domain, as explained at
@@ -592,7 +594,7 @@ MAX_RELEASE_CHECK_RATE default: 4095 unless not HAVE_MMAP
#define MMAP_CLEARS 1
#endif /* MMAP_CLEARS */
#ifndef HAVE_MREMAP
-#if linux
+#ifdef linux
#define HAVE_MREMAP 1
#else /* linux */
#define HAVE_MREMAP 0
View
4 tests/runner.py
@@ -2975,7 +2975,7 @@ def test_fasta(self):
def test_dlmalloc(self):
global CORRECT_SIGNS; CORRECT_SIGNS = 2
- global CORRECT_SIGNS_LINES; CORRECT_SIGNS_LINES = ['src.cpp:' + str(i) for i in [4816, 4191, 4246, 4199, 4205, 4235, 4227]]
+ global CORRECT_SIGNS_LINES; CORRECT_SIGNS_LINES = ['src.cpp:' + str(i+4) for i in [4816, 4191, 4246, 4199, 4205, 4235, 4227]]
global TOTAL_MEMORY; TOTAL_MEMORY = 100*1024*1024 # needed with typed arrays
src = open(path_from_root('src', 'dlmalloc.c'), 'r').read() + '\n\n\n' + open(path_from_root('tests', 'dlmalloc_test.c'), 'r').read()
@@ -4410,7 +4410,7 @@ def test_raytrace(self):
def test_dlmalloc(self):
global COMPILER_TEST_OPTS; COMPILER_TEST_OPTS = ['-g']
global CORRECT_SIGNS; CORRECT_SIGNS = 2
- global CORRECT_SIGNS_LINES; CORRECT_SIGNS_LINES = ['src.cpp:' + str(i) for i in [4816, 4191, 4246, 4199, 4205, 4235, 4227]]
+ global CORRECT_SIGNS_LINES; CORRECT_SIGNS_LINES = ['src.cpp:' + str(i+4) for i in [4816, 4191, 4246, 4199, 4205, 4235, 4227]]
src = open(path_from_root('src', 'dlmalloc.c'), 'r').read() + '\n\n\n' + open(path_from_root('tests', 'dlmalloc_test.c'), 'r').read()
self.do_benchmark(src, ['400', '400'], '*400,0*')
Please sign in to comment.
Something went wrong with that request. Please try again.