Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Scott <conrad.scott@dsl.pipex.com>2002-08-18 16:09:28 +0400
committerConrad Scott <conrad.scott@dsl.pipex.com>2002-08-18 16:09:28 +0400
commit210a84b5cd6bdac9c4bdea682ccae32582e0b2c7 (patch)
tree9995c9e2be6984f08d0bfe8efaf367d595a031d6 /winsup/cygwin/malloc.cc
parentc7f4bbda99cdba696d30b510530af90d9434ea2d (diff)
Merged changes from HEAD
Diffstat (limited to 'winsup/cygwin/malloc.cc')
-rw-r--r--winsup/cygwin/malloc.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/winsup/cygwin/malloc.cc b/winsup/cygwin/malloc.cc
index 45005fdb8..02832bb99 100644
--- a/winsup/cygwin/malloc.cc
+++ b/winsup/cygwin/malloc.cc
@@ -5,7 +5,7 @@
way you wish. Send questions, comments, complaints, performance
data, etc to dl@cs.oswego.edu
-* VERSION 2.7.1 Thu Jul 25 10:58:03 2002 Doug Lea (dl at gee)
+* VERSION 2.7.2 Sat Aug 17 09:07:30 2002 Doug Lea (dl at gee)
Note: There may be an updated version of this malloc obtainable at
ftp://gee.cs.oswego.edu/pub/misc/malloc.c
@@ -1567,8 +1567,8 @@ static pthread_mutex_t mALLOC_MUTEx = PTHREAD_MUTEX_INITIALIZER;
/* Substitute anything you like for these */
-#define MALLOC_PREACTION __malloc_lock ()
-#define MALLOC_POSTACTION __malloc_unlock ()
+#define MALLOC_PREACTION (0)
+#define MALLOC_POSTACTION (0)
#endif
@@ -2412,8 +2412,8 @@ struct malloc_state {
/* Normal bins packed as described above */
mchunkptr bins[NBINS * 2];
- /* Bitmap of bins */
- unsigned int binmap[BINMAPSIZE];
+ /* Bitmap of bins. Trailing zero map handles cases of largest binned size */
+ unsigned int binmap[BINMAPSIZE+1];
/* Tunable parameters */
CHUNK_SIZE_T trim_threshold;
@@ -3294,7 +3294,7 @@ static Void_t* sYSMALLOc(nb, av) INTERNAL_SIZE_T nb; mstate av;
-
+#ifndef MORECORE_CANNOT_TRIM
/*
sYSTRIm is an inverse of sorts to sYSMALLOc. It gives memory back
to the system (via negative arguments to sbrk) if there is unused
@@ -3360,6 +3360,7 @@ static int sYSTRIm(pad, av) size_t pad; mstate av;
}
return 0;
}
+#endif /*MORECORE_CANNOT_TRIM*/
/*
------------------------------ malloc ------------------------------
@@ -5433,6 +5434,9 @@ static int cpuinfo (int whole, CHUNK_SIZE_T *kernel, CHUNK_SIZE_T *user) {
/* ------------------------------------------------------------
History:
+ V2.7.2 Sat Aug 17 09:07:30 2002 Doug Lea (dl at gee)
+ * Fix malloc_state bitmap array misdeclaration
+
V2.7.1 Thu Jul 25 10:58:03 2002 Doug Lea (dl at gee)
* Allow tuning of FIRST_SORTED_BIN_SIZE
* Use PTR_UINT as type for all ptr->int casts. Thanks to John Belmonte.