Mail Archives: cygwin-developers/2002/08/16/16:13:08
Given the recent problem that Jason and I noted in malloc,
I thought it would be interesting to see how far out of date
newlib's malloc might be. Newlib's is 2.6.4 and Doug Lea's
is 2.7.1. AFAICT, Jason's problem has been fixed in 2.7.1.
So, I made an executive decision and just imported Doug Lea's
malloc into winsup/cygwin. It might have been "more correct"
to make the effort to get this into newlib but this would have
been a pretty major undertaking so I took the easy way out.
In the process of doing this, I decided to export more of the
functions found in malloc, like valloc, memalign, malloc_stats,
and others. However, what I *did not* do was set up some mechanism
for allowing these to be overridden by user programs as is the case
with simple functions like malloc, calloc, etc. I'm sure that this
will cause us some exotic grief at some point but I want to first
see if I really have to worry about this before taking the time
to change things.
In the process of doing this, I got rid of one extra layer of wrapper
for malloc calls straight from the cygwin DLL so things should be a
little faster. I also defined all of the dlmalloc functions with
"regparm" and compile malloc with -fomit-frame-pointer, which should
provide some added speed.
This probably means that malloc debugging is currently broken in cygwin
since it relies on YA hacked version of Doug Lea's malloc but it
shouldn't be too difficult to get things working there. I'd appreciate
a volunteer to look into this.
I'm building a snapshot now. I guess that will be the first step
in seeing just what I've broken.
cgf
- Raw text -