We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80fca1f commit 1a28e35Copy full SHA for 1a28e35
third_party/dlmalloc/dlmalloc.c
@@ -32,6 +32,7 @@
32
#define HAVE_MREMAP 0
33
#define HAVE_MORECORE 0
34
#define USE_LOCKS 2
35
+#define USE_SPIN_LOCKS 0
36
#define MORECORE_CONTIGUOUS 0
37
#define MALLOC_INSPECT_ALL 1
38
#define ABORT_ON_ASSERT_FAILURE 0
third_party/dlmalloc/locks.inc
@@ -29,7 +29,7 @@
29
30
*/
31
-#ifdef USE_SPIN_LOCKS
+#if USE_SPIN_LOCKS
#define MLOCK_T atomic_uint
@@ -62,11 +62,13 @@ static int malloc_wipe(MLOCK_T *lk) {
62
}
63
64
static int malloc_lock(MLOCK_T *lk) {
65
+ if (!__threaded) return 0;
66
nsync_mu_lock(lk);
67
return 0;
68
69
70
static int malloc_unlock(MLOCK_T *lk) {
71
72
nsync_mu_unlock(lk);
73
74
0 commit comments