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:
authorDavid Starks-Browning <starksb@ebi.ac.uk>2000-07-25 23:50:31 +0400
committerDavid Starks-Browning <starksb@ebi.ac.uk>2000-07-25 23:50:31 +0400
commit717a3d7b37cfa7c8c228feeed1bbb851099ec679 (patch)
treea423b1a2d47b1ece99a625ee5a544412f06d4c8f
parent7e0482eecd057ec3f9195efb5b926341df83f3d1 (diff)
Entry 'Can I use my own malloc?': Add warning about _malloc_r from newlib.
-rw-r--r--winsup/doc/how.texinfo11
1 files changed, 8 insertions, 3 deletions
diff --git a/winsup/doc/how.texinfo b/winsup/doc/how.texinfo
index 0a8c1d0e3..e7f93bc21 100644
--- a/winsup/doc/how.texinfo
+++ b/winsup/doc/how.texinfo
@@ -1305,9 +1305,6 @@ Include stdlib.h instead of malloc.h.
@subsection Can I use my own malloc?
-@strong{(Please note: This section has not yet been updated for the latest
-net release.)}
-
If you define a function called @code{malloc} in your own code, and link
with the DLL, the DLL @emph{will} call your @code{malloc}. Needless to
say, you will run into serious problems if your malloc is buggy.
@@ -1318,6 +1315,14 @@ This process uses @code{malloc} @emph{before} your main line is started.
If you have written your own @code{malloc} to need some initialization
to occur after @code{main} is called, then this will surely break.
+Moreover, there is an outstanding issue with @code{_malloc_r} in
+@code{newlib}. This re-entrant version of @code{malloc} will be called
+directly from within @code{newlib}, by-passing your custom version, and
+is probably incompatible with it. But it may not be possible to replace
+@code{_malloc_r} too, because @code{cygwin1.dll} does not export it and
+Cygwin does not expect your program to replace it. This is really a
+newlib issue, but we are open to suggestions on how to deal with it.
+
@subsection Can I mix objects compiled with msvc++ and gcc?
Yes, but only if you are combining C object files. MSVC C++ uses a