public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/42381] New: deque shouldn't reserve that much memory
@ 2009-12-15 17:23 kraemer at informatik dot uni-kl dot de
2009-12-15 17:38 ` [Bug libstdc++/42381] " paolo dot carlini at oracle dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: kraemer at informatik dot uni-kl dot de @ 2009-12-15 17:23 UTC (permalink / raw)
To: gcc-bugs
In bits/stl_deque.h, line 80ff the minimal allocated size is set fixed to 512.
This should be configurable, at least via a macro.
In case of small memory systems (embedded devices) resveration of this amount
of memory is much too high.
--
Summary: deque shouldn't reserve that much memory
Product: gcc
Version: 4.4.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kraemer at informatik dot uni-kl dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42381
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/42381] deque shouldn't reserve that much memory
2009-12-15 17:23 [Bug libstdc++/42381] New: deque shouldn't reserve that much memory kraemer at informatik dot uni-kl dot de
@ 2009-12-15 17:38 ` paolo dot carlini at oracle dot com
2009-12-15 17:42 ` paolo dot carlini at oracle dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-12-15 17:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from paolo dot carlini at oracle dot com 2009-12-15 17:38 -------
Changing the value, via macro or whatever is trivial, and I can tell you for
sure from some experiment I did, that a *larger* value is much better, when
memory is available, for operations like copies. Changing the value however,
breaks the binary compatibility between objects (e.g, one allocating, the other
deallocating the same deque), it's a dangerous option.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42381
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/42381] deque shouldn't reserve that much memory
2009-12-15 17:23 [Bug libstdc++/42381] New: deque shouldn't reserve that much memory kraemer at informatik dot uni-kl dot de
2009-12-15 17:38 ` [Bug libstdc++/42381] " paolo dot carlini at oracle dot com
@ 2009-12-15 17:42 ` paolo dot carlini at oracle dot com
2009-12-15 17:58 ` paolo dot carlini at oracle dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-12-15 17:42 UTC (permalink / raw)
To: gcc-bugs
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42381
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/42381] deque shouldn't reserve that much memory
2009-12-15 17:23 [Bug libstdc++/42381] New: deque shouldn't reserve that much memory kraemer at informatik dot uni-kl dot de
2009-12-15 17:38 ` [Bug libstdc++/42381] " paolo dot carlini at oracle dot com
2009-12-15 17:42 ` paolo dot carlini at oracle dot com
@ 2009-12-15 17:58 ` paolo dot carlini at oracle dot com
2009-12-15 20:59 ` paolo at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-12-15 17:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from paolo dot carlini at oracle dot com 2009-12-15 17:57 -------
Let's add a macro (with a *big* warning), will be also useful for experimenting
when I will add (soon) the segmented iterator optimization for copies.
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |paolo dot carlini at oracle
|dot org |dot com
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-12-15 17:57:38
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42381
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/42381] deque shouldn't reserve that much memory
2009-12-15 17:23 [Bug libstdc++/42381] New: deque shouldn't reserve that much memory kraemer at informatik dot uni-kl dot de
` (2 preceding siblings ...)
2009-12-15 17:58 ` paolo dot carlini at oracle dot com
@ 2009-12-15 20:59 ` paolo at gcc dot gnu dot org
2009-12-15 21:02 ` paolo dot carlini at oracle dot com
2009-12-16 10:51 ` kraemer at informatik dot uni-kl dot de
5 siblings, 0 replies; 7+ messages in thread
From: paolo at gcc dot gnu dot org @ 2009-12-15 20:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from paolo at gcc dot gnu dot org 2009-12-15 20:58 -------
Subject: Bug 42381
Author: paolo
Date: Tue Dec 15 20:58:29 2009
New Revision: 155271
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155271
Log:
2009-12-15 Paolo Carlini <paolo.carlini@oracle.com>
PR libsdtc++/42381
* include/bits/stl_deque.h (_GLIBCXX_DEQUE_BUF_SIZE): Add.
(__deque_buf_size(size_t)): Use it.
* testsuite/23_containers/deque/requirements/dr438/
assign_neg.cc: Adjust dg-error line numbers.
* testsuite/23_containers/deque/requirements/dr438/
insert_neg.cc: Likewise.
* testsuite/23_containers/deque/requirements/dr438/
constructor_1_neg.cc: Likewise.
* testsuite/23_containers/deque/requirements/dr438/
constructor_2_neg.cc: Likewise.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/stl_deque.h
trunk/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc
trunk/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc
trunk/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc
trunk/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42381
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/42381] deque shouldn't reserve that much memory
2009-12-15 17:23 [Bug libstdc++/42381] New: deque shouldn't reserve that much memory kraemer at informatik dot uni-kl dot de
` (3 preceding siblings ...)
2009-12-15 20:59 ` paolo at gcc dot gnu dot org
@ 2009-12-15 21:02 ` paolo dot carlini at oracle dot com
2009-12-16 10:51 ` kraemer at informatik dot uni-kl dot de
5 siblings, 0 replies; 7+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-12-15 21:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from paolo dot carlini at oracle dot com 2009-12-15 21:01 -------
Done.
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42381
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/42381] deque shouldn't reserve that much memory
2009-12-15 17:23 [Bug libstdc++/42381] New: deque shouldn't reserve that much memory kraemer at informatik dot uni-kl dot de
` (4 preceding siblings ...)
2009-12-15 21:02 ` paolo dot carlini at oracle dot com
@ 2009-12-16 10:51 ` kraemer at informatik dot uni-kl dot de
5 siblings, 0 replies; 7+ messages in thread
From: kraemer at informatik dot uni-kl dot de @ 2009-12-16 10:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from kraemer at informatik dot uni-kl dot de 2009-12-16 10:50 -------
thanks a lot.
in our scenario it showed 8 buckets to be the best. but this may vary by usage.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42381
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-12-16 10:51 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-15 17:23 [Bug libstdc++/42381] New: deque shouldn't reserve that much memory kraemer at informatik dot uni-kl dot de
2009-12-15 17:38 ` [Bug libstdc++/42381] " paolo dot carlini at oracle dot com
2009-12-15 17:42 ` paolo dot carlini at oracle dot com
2009-12-15 17:58 ` paolo dot carlini at oracle dot com
2009-12-15 20:59 ` paolo at gcc dot gnu dot org
2009-12-15 21:02 ` paolo dot carlini at oracle dot com
2009-12-16 10:51 ` kraemer at informatik dot uni-kl dot de
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).