comp.lang.ada
 help / color / mirror / Atom feed
From: gwinn@res.ray.com (Joe Gwinn)
Subject: Re: Beware: Rep spec on an enumeration type causes code explosion
Date: 1997/12/08
Date: 1997-12-08T00:00:00+00:00	[thread overview]
Message-ID: <gwinn-0812971217080001@dh5055133.res.ray.com> (raw)
In-Reply-To: m267p2p27b.fsf@wf-rch.cirr.com


In article <m267p2p27b.fsf@wf-rch.cirr.com>, Corey Minyard
<minyard@acm.org> wrote:

> gwinn@res.ray.com (Joe Gwinn) writes:
> > 
> > Memory Management.  The Ada Runtime System makes extensive calls to the C
> > functions malloc() and free(), a cause for worry.  Variable-block
> > allocators such as malloc and free are generally unsuited for nonstop
> > heavy use, and will generally either leak memory or fragment their memory
> > pool, causing the application to run slower and slower until it eventually
> > jams.   The use of free() in a realtime system is generally forbidden;
> > it's OK to allocate a bunch of memory during startup, and explicitly
> > manage it yourself during operation, but it is not OK to use malloc and
> > free for realtime memory management.  The claim is that Wind River's
> > version of malloc/free is stable in realtime use.  It's hard to see how
> > this could be true.   This will need further research.  
> > 
> 
> Although this is not Ada related, I ran into this, too, when using C.
> The VxWorks implementations of malloc() and free() are very bad, they
> are slow and their speed decreases over use (we saw >100ms malloc
> times on every call after a while!).
> 
> I ported GNU malloc, used the standard VxWorks calls to allocate a
> block, and used that instead.  The times remained sub-millisecond even
> after a long time.  Some people in VxWorks have the port, I suggest
> you contact you VxWorks rep for it, since they have probably improved
> it.

As I said in my reply to Tucker Taft, our experience is that only
fixed-block allocators work in embedded realtime, especially when the
system is heavily loaded.  Such allocators have constant performance,
right up to the point of pool exhaustion, and recover instantly when
someone returns some memory.  Variable block allocators as a class run
slower and slower as their pool approaches exhaustion; this is exactly the
wrong behaviour, as it makes worse the effects of the original overload.

Joe Gwinn




  reply	other threads:[~1997-12-08  0:00 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-12-05  0:00 Beware: Rep spec on an enumeration type causes code explosion Joe Gwinn
1997-12-06  0:00 ` Kevin D. Heatwole
     [not found]   ` <dewar.881478386@merv>
1997-12-07  0:00     ` Robert Dewar
1997-12-09  0:00   ` Jim Gleason
1997-12-06  0:00 ` Tucker Taft
1997-12-06  0:00   ` Robert Dewar
1997-12-06  0:00   ` Robert Dewar
1997-12-08  0:00   ` Joe Gwinn
1997-12-08  0:00     ` Mats Weber
1997-12-09  0:00     ` Tucker Taft
1997-12-09  0:00       ` Matthew Heaney
1997-12-10  0:00         ` Charles Hixson
1997-12-10  0:00       ` Stanley R. Allen
1997-12-14  0:00         ` Robert Dewar
1997-12-10  0:00       ` Stephen Leake
1997-12-14  0:00         ` Robert Dewar
1997-12-10  0:00       ` Ken Garlington
1997-12-11  0:00         ` John G. Volan
1997-12-11  0:00           ` Ken Garlington
1997-12-12  0:00             ` Matthew Heaney
1997-12-12  0:00               ` Ken Garlington
1997-12-16  0:00                 ` John G. Volan
1997-12-17  0:00                   ` Ken Garlington
1997-12-12  0:00           ` Joe Gwinn
1997-12-12  0:00             ` Robert Dewar
1997-12-16  0:00             ` John G. Volan
1997-12-17  0:00               ` Joe Gwinn
1997-12-17  0:00                 ` John G. Volan
1997-12-18  0:00                   ` Joe Gwinn
1997-12-17  0:00               ` Ken Garlington
1997-12-12  0:00           ` Alan E & Carmel J Brain
1997-12-12  0:00             ` Robert Dewar
1997-12-15  0:00               ` Tucker Taft
1997-12-16  0:00                 ` Brian Rogoff
1997-12-10  0:00       ` Jean-Pierre Rosen
1997-12-10  0:00       ` Robert Dewar
1997-12-11  0:00       ` Rakesh Malhotra
1997-12-11  0:00         ` Matthew Heaney
1997-12-12  0:00           ` Samuel Tardieu
1997-12-12  0:00             ` Robert Dewar
1997-12-12  0:00           ` Rakesh Malhotra
1997-12-12  0:00           ` Robert Dewar
1997-12-14  0:00         ` Alan E & Carmel J Brain
1997-12-12  0:00       ` Joe Gwinn
1997-12-15  0:00         ` Robert Dewar
1997-12-16  0:00           ` Joe Gwinn
1997-12-16  0:00             ` Robert Dewar
1997-12-09  0:00     ` Geert Bosch
1997-12-10  0:00       ` Robert Dewar
1997-12-06  0:00 ` David Marshall
1997-12-06  0:00 ` Robert Dewar
1997-12-06  0:00   ` Matthew Heaney
1997-12-10  0:00   ` GNORT information ( Was Re: Beware: Rep spec on an enumeration type causes code explosion ) Mark Bennison
1997-12-10  0:00     ` Robert Dewar
1997-12-06  0:00 ` Beware: Rep spec on an enumeration type causes code explosion Robert Dewar
1997-12-06  0:00 ` Robert Dewar
1997-12-08  0:00   ` Joe Gwinn
1997-12-06  0:00 ` Robert Dewar
1997-12-08  0:00   ` Joe Gwinn
1997-12-09  0:00     ` Stanley R. Allen
1997-12-06  0:00 ` Robert Dewar
1997-12-06  0:00 ` Ken Garlington
1997-12-06  0:00 ` Corey Minyard
1997-12-08  0:00   ` Joe Gwinn [this message]
1997-12-10  0:00     ` Robert Dewar
1997-12-07  0:00 ` Larry Kilgallen
  -- strict thread matches above, loose matches on Subject: below --
1997-12-09  0:00 tmoran
1997-12-11  0:00 Marin David Condic, 561.796.8997, M/S 731-96
1997-12-11  0:00 ` Robert Dewar
1997-12-11  0:00 Marin David Condic, 561.796.8997, M/S 731-96
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox