Are these files used anywhere?

Phil Edwards pedwards@disaster.jaj.com
Fri Nov 16 12:46:00 GMT 2001


On Mon, Nov 26, 2001 at 10:44:18AM +0100, Stefan Olsson wrote:
> We are currently using the stl_pthread_alloc.h files and underlying implementation
> to get the best performance in our MT application.

But you're not using them through the V3 headers, right?

I think maybe I'll just move them into 'backward' instead of removing
them altogether.


> There are a couple of things in this implementation that makes sense to us in
> terms of MT and multiprocessor support, such as the SGI_SOURCE that tries to align
> to cacheboundries:
[...]
> One idea would be to look into a modification of the standard stl_alloc
> implementation so that this could be thread aware and tries to do more alignment
> than it currently does.

Patches welcome.  I'm /very/ keen on providing multiple options for users
to tune memory management.  We just need to find a coherent way of doing so.


> I.e. stl_alloc could keep a small per thread free list (ifdef __STL_THREADS) and
> one "per process/threadinspecific" free list (as it currently does) and the
> interface to malloc for chunks bigger than 128 bytes (the current limit).

Upping that limit is on my to-do list; 256 bytes is the number I have
in mind.  I'm wondering about wasted memory overhead on low-memory systems...


> In any case i think that we (newbies to the internal stuff of STL) could use a
> discussion/get an explanation about the design decisions made about the diffrent
> layers of memory caching. I am aware that this is hard to do since each platform
> has it's own malloc() implementation, but for instance under Linux it feels like
> we are doing cacheing on several levels (since the malloc() under linux keeps free
> lists of it's own).

I'm working on that right now.  Parts of stl_alloc.h have been doxygenated.
I have more changes in my local tree for additional comments and proper
uglification (gads, that alloc -> __alloc change is propogating everywhere).
Please look those comments over (via doxygen if you like *grin*).

Once that's done, docs/html/ext/howto.html#3 will finally get some contents.

Phil

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams



More information about the Libstdc++ mailing list