summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2013-01-21 04:43:48 +0000
committerChristopher Faylor <me@cgf.cx>2013-01-21 04:43:48 +0000
commit2033ccdd173feb5a4c2978d547bbd6669ff0f84e (patch)
tree150d3d7f18f47bcd750f7603e537a37eb0d30bd5
parentbc837d22f3f2ee84cfa575ea1d33d8271d4e3450 (diff)
downloadcygnal-2033ccdd173feb5a4c2978d547bbd6669ff0f84e.tar.gz
cygnal-2033ccdd173feb5a4c2978d547bbd6669ff0f84e.tar.bz2
cygnal-2033ccdd173feb5a4c2978d547bbd6669ff0f84e.zip
* malloc_wrapper.cc (malloc_init): Re-add inadvertently dropped comment which
explains what's going on with the use_internal calculation.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/malloc_wrapper.cc3
2 files changed, 8 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index f7268546f..8c953e85c 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2013-01-20 Christopher Faylor <me.cygwin2013@cgf.cx>
+ * malloc_wrapper.cc (malloc_init): Re-add inadvertently dropped comment
+ which explains what's going on with the use_internal calculation.
+
+2013-01-20 Christopher Faylor <me.cygwin2013@cgf.cx>
+
Throughout, update copyrights to reflect dates which correspond to
main-branch checkins. Regularize copyright format.
diff --git a/winsup/cygwin/malloc_wrapper.cc b/winsup/cygwin/malloc_wrapper.cc
index bbf629829..46493b775 100644
--- a/winsup/cygwin/malloc_wrapper.cc
+++ b/winsup/cygwin/malloc_wrapper.cc
@@ -284,6 +284,9 @@ malloc_init ()
if (!internal_malloc_determined)
{
extern void *_sigfe_malloc;
+ /* Decide if we are using our own version of malloc by testing the import
+ address from user_data. This will likely need to be updated
+ for 64-bit. */
use_internal = import_address (user_data->malloc) == &_sigfe_malloc;
malloc_printf ("using %s malloc", use_internal ? "internal" : "external");
internal_malloc_determined = true;