public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Benjamin Kosnik <bkoz@redhat.com>
To: libstdc++ <libstdc++@gcc.gnu.org>, gcc-patches@gcc.gnu.org
Subject: [v3]  pb_ds fixes for debug mode, valgrind
Date: Tue, 24 May 2011 09:38:00 -0000	[thread overview]
Message-ID: <20110523191456.4fe42704@shotwell> (raw)

[-- Attachment #1: Type: text/plain, Size: 1516 bytes --]


This aims to fix several longstanding memory issues in ext/pb_ds, and
the rest of the -D_GLIBCXX_DEBUG fails. I believe PR libstdc++/37144
and PR libstdc++/28457 apply. 

In a nutshell, these fixes were

1) ov_tree_map/join, remove debug join, adjust dtor
2) trie/rec_split, move to opportunistic interator usage
3) binary_heap/pop, adjust pop_heap usage, be caseful
about make_heap.

Anyway. This extension code is the last part of the docs not expressed
in doxygen and docbook. The docbook parts are in motion but the
conversion is not yet complete. Here's the doxygen part and some
refactoring based on it. There are several transformations and
reductions (null_type consolidation, template parameter reductions in
pat_trie, etc, etc, etc.) Perhaps I went too far with some
of the reductions and replacements in pat_trie_base, where I stripped
out the _Alloc parameter in a fit of pique. Enough with the rebinding!!!
It can be re-added, but it seems like the smarter ploy is to integrate
this with the trie traits class as a base in a more streamlined manner
with conscious attention being paid to minimizing the rebinds....

I'll be curious to see/do this as part of C++0x allocator work. 

There is a known issue WRT doxygen and figuring out
template-metaprogrammed base types, discussed here:
https://svn.boost.org/trac/boost/wiki/Guidelines/DoxygenGuidelines

Unfortunately this exists in abundance with this design.

tested x86_64/linux
make check
make check-debug
make check-performance
valgrind

-benjamin

[-- Attachment #2: 20110523-4.patch.bz2 --]
[-- Type: application/x-bzip, Size: 107610 bytes --]

                 reply	other threads:[~2011-05-24  2:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110523191456.4fe42704@shotwell \
    --to=bkoz@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).