delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2002/08/16/16:13:08

Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT cygwin DOT com>
List-Help: <mailto:cygwin-developers-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT cygwin DOT com
Delivered-To: mailing list cygwin-developers AT cygwin DOT com
Date: Fri, 16 Aug 2002 16:13:18 -0400
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin-developers AT cygwin DOT com
Subject: eliminated reliance on newlib malloc
Message-ID: <20020816201318.GA24942@redhat.com>
Reply-To: cygwin-developers AT cygwin DOT com
Mail-Followup-To: cygwin-developers AT cygwin DOT com
Mime-Version: 1.0
User-Agent: Mutt/1.3.23.1i

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019