Click here to Skip to main content
15,914,416 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CRYSTL32.OCX problem ! Pin
l a u r e n9-Apr-02 0:56
l a u r e n9-Apr-02 0:56 
GeneralRe: CRYSTL32.OCX problem ! Pin
Hadi Rezaee9-Apr-02 4:00
Hadi Rezaee9-Apr-02 4:00 
GeneralRe: CRYSTL32.OCX problem ! Pin
Hadi Rezaee9-Apr-02 10:02
Hadi Rezaee9-Apr-02 10:02 
GeneralWord Automation - Extra Info on Tables.. Pin
Braulio Dez8-Apr-02 22:41
Braulio Dez8-Apr-02 22:41 
GeneralSTL and heap management Pin
Haakon S.8-Apr-02 22:26
Haakon S.8-Apr-02 22:26 
GeneralRe: STL and heap management Pin
Christian Graus8-Apr-02 23:21
protectorChristian Graus8-Apr-02 23:21 
GeneralRe: STL and heap management Pin
Haakon S.9-Apr-02 0:20
Haakon S.9-Apr-02 0:20 
GeneralRe: STL and heap management Pin
Joao Vaz9-Apr-02 1:07
Joao Vaz9-Apr-02 1:07 
The containers in STL normally implement a allocation strategie of 2*n elements, so if you request for instance 24 elements the vector will allocate space for 48 elem +/- , this is for performance reasons, since pre-allocating memory it's more cheap than allocating the memory one step at the time. But the normal allocator strategy is slow when you are always allocating small objects on the heap, then if this is your case perhaps you need a custom block allocator, this is tricky business. For a good book explaining custom allocators and their use with STL, I advise you to buy Modern C++ Design by Andrei Alexandrescu , it's a great book and it have a full chapter explaining the allocator philosophy on STL and the implementation of a custom allocator for efficient use with small objects on the heap.
Check his site: http://www.moderncppdesign.com

and the source code of Loki(c++ advanced library), that includes the custom allocator, a note here, VC6++ neither VS. NET fully compiles this library due to lack of support of pts(partial template specialization), The sp1 of VS.net will compile this Smile | :)

loki source code

Cheers,

Joao Vaz
GeneralRe: STL and heap management Pin
Haakon S.9-Apr-02 1:50
Haakon S.9-Apr-02 1:50 
GeneralRe: STL and heap management Pin
Joao Vaz9-Apr-02 3:48
Joao Vaz9-Apr-02 3:48 
GeneralRe: STL and heap management Pin
Tim Smith9-Apr-02 4:10
Tim Smith9-Apr-02 4:10 
GeneralRe: STL and heap management Pin
Joao Vaz9-Apr-02 4:49
Joao Vaz9-Apr-02 4:49 
GeneralRe: STL and heap management Pin
Haakon S.9-Apr-02 8:17
Haakon S.9-Apr-02 8:17 
GeneralRe: STL and heap management Pin
Joao Vaz9-Apr-02 9:56
Joao Vaz9-Apr-02 9:56 
GeneralRe: STL and heap management Pin
Tim Smith9-Apr-02 8:44
Tim Smith9-Apr-02 8:44 
GeneralRe: STL and heap management Pin
Joao Vaz9-Apr-02 10:03
Joao Vaz9-Apr-02 10:03 
GeneralClosing message! Pin
Rickard Andersson208-Apr-02 22:27
Rickard Andersson208-Apr-02 22:27 
GeneralRe: Closing message! Pin
lucy9-Apr-02 3:43
lucy9-Apr-02 3:43 
GeneralRe: Closing message! Pin
Rickard Andersson209-Apr-02 4:39
Rickard Andersson209-Apr-02 4:39 
General"Show window contents while dragging" Pin
Hans Ruck8-Apr-02 21:29
Hans Ruck8-Apr-02 21:29 
GeneralRe: "Show window contents while dragging" Pin
Shog99-Apr-02 5:27
sitebuilderShog99-Apr-02 5:27 
QuestionWhat is the difference between the dialog types available in resource editor? Pin
vcLearner8-Apr-02 21:30
vcLearner8-Apr-02 21:30 
AnswerRe: What is the difference between the dialog types available in resource editor? Pin
John Aspras8-Apr-02 21:36
John Aspras8-Apr-02 21:36 
GeneralProblem with LIKE from MFC Pin
8-Apr-02 19:31
suss8-Apr-02 19:31 
GeneralRe: Problem with LIKE from MFC Pin
Derek Waters8-Apr-02 19:35
Derek Waters8-Apr-02 19:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.