473,395 Members | 1,442 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

tapping into STL mempool

hi,
I have a software which uses huge STL data structures. Since STL
retains its mempool, the memory that is used is not given back to the
system.

Now consider a simple class:

MyClass *c1=new MyClass;

Suppose I do a million of these too, then it takes up all of the memory
left over.
Two questions:

1. Can I use STL's memory pool to allocate memory for this class as
well - Is there a piece of code I can look to see?
2. How do I **verify** that I am using STL's memory pool - I have
valgrind at my disposal. I dont want to make a mistake and think
everything is working hunky dory.

Thanks in advance
-Sandeep
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Mar 9 '06 #1
1 2001
Sandeep Srinivasa wrote:
I have a software which uses huge STL data structures. Since STL
retains its mempool, the memory that is used is not given back to the
system.


I think you're referring to a particular implementation of STL, since
there is no requirement in the C++ Standard to hold on to memory. You'll
have to ask the folks who support your implementation.

--

Pete Becker
Roundhouse Consulting, Ltd.

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Mar 9 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Hanzo | last post by:
I'm currently fighting my way through an example of Single-Threaded Memory Pooling in a chapter of the Efficient C++ book by Dov Bulka & David Mayhew. Unfortuantely, I'm starting to get code that...
2
by: EMW | last post by:
I have one form which is my main form and has 4 option buttons and two regular buttons, one for saving and the other for canceling the program. When the user select an option button, a new form is...
1
by: Alex | last post by:
Acc97 on a subform I have a series of Combo box's which because of my inability to think ahead! I have had to use a field on the last one which I did not intend to use, and bound to it....
0
by: EMW | last post by:
I am busy with a program for my pocket pc. but since it is still compact famework, I'll post this here too, because I'm very much in need for some help with this: I have one form which is my...
25
by: Michelle | last post by:
Hi, I am new it vb.net and am looking at writing for touch screens as one of my clients wants their application written for touch screens. I'm sure someone that done this before. Are there links...
1
by: Ali | last post by:
My problem is quite similar to Item 10 of Effective C++ (Scott Meyers): http://www.awprofessional.com/content/downloads/meyerscddemo/DEMO/EC/EI10_FR.HTM I have Airplane objects declared in a...
5
by: =?ISO-8859-1?Q?Tor_Erik_S=F8nvisen?= | last post by:
Hi, Does anyone know how to interrupt the lookup of an integer value? I know I need to subclass int, since builtin types can't be altered directly... Below is how far I've come... What I want...
12
by: Rahul | last post by:
Hi Everyone, I have the following code and i'm able to invoke the destructor explicitly but not the constructor. and i get a compile time error when i invoke the constructor, why is this so? ...
3
by: Mike | last post by:
Hi, I have a simple "memPool' class that simply maintains a linked list of chunks from which allocation requests are made. The whole thing is deleted all at once upon destruction. So far, so...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.