PATCH: fail to improve psymtab memory consumption
Christopher Faylor
cgf@redhat.com
Tue Jul 24 09:35:00 GMT 2001
[Reply-To set to gdb-patches -- beware!!!]
On Tue, Jul 24, 2001 at 09:15:25AM -0700, Kevin Buettner wrote:
>On Jul 24, 1:15am, Daniel Berlin wrote:
>
>> If you look at the code, you'll note this is a perfectly fair
>> benchmark, since i'm not pulling any tricks, just using a different
>> method of getting a memory buffer for a part of a section (With mmap,
>> it mmap's it, without it, it fread's it).
>
>I've always been a fan of mmap(). As Dan has pointed out, there can
>be several different performance wins (faster, uses less memory)
>associated with using it.
>
>However, one of the problems with mmap() is that it's not terribly
>portable. Most unices these days will have it, but some might have
>buggy implementations or take slightly different sets of options.
>Also, those systems which don't have mmap frequently have something
>comparable. The point that I'm driving towards is that if we're going
>to use mmap(), I think it would be best if we provide a layer above it
>so that all of the nasty "#ifdef HAVE_MMAP" baggage can be hidden away
>in one place. This layer will attempt to use mmap() or equivalent
>facilities, but failing that, it'll simply read() into a suitably
>sized buffer...
FWIW, Cygwin's mmap is not 100% compliant with UNIX. There is not
a complete overlap in functionality between Windows and UNIX. This
is *especially* true of Windows 9x/Me.
We ran into problems when gcc decided to use mmap more heavily. This
immediately highlighted Cygwin's problems. We hacked around things
so that gcc actually works on NT and 9x but I think we've pushed the
envelope of what is possible for UNIX emulation.
cgf
More information about the Gdb-patches
mailing list