Re: CString mess HEAP in long running programs ?

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Ivan Brugiolo [MSFT] (ivanbrug_at_online.microsoft.com)
Date: 03/01/04


Date: Mon, 1 Mar 2004 09:58:12 -0800

What kind of HEAP problem are you thinking about ?
For HEAP corruptions, the class CString alone used correctly will cause
problems.
For HEAP fragmentation, generic C++ code that uses a lot of allocations
in order to implement the deep-copy semantics of certain C++ objects
may cause heap fragmentation, but that is really up to your application,
and it cannot be foretold in advance.

-- 
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Al Havrilla" <anonymous@discussions.microsoft.com> wrote in message
news:AED28DA7-8081-4294-8817-759A2CC6EE36@microsoft.com...
> hi
> i make heavy use of CString in database and communications routines in a
large program that runs for months.  will this eventually cause HEAP
problems?
> thanks
> al
>


Relevant Pages

  • Re: Memory management terminology
    ... and let's assume that heap fragmentation is not the problem. ... a particual allocation pattern run OOM the machine even if there ... not on any smaller or larger chunk of memory. ...
    (microsoft.public.vc.language)
  • Re: What do you LISPers think of Haskell?
    ... Similarly the first fit heap management ... Heap fragmentation is less of a problem. ... Google's new web browser Chrome is written in C++. ...
    (comp.lang.lisp)
  • Re: GC performance - GC fragility
    ... Think of a native heap which has ... I haven't tested FMM regarding heap fragmentation. ... You seem to have more clue than I have and since I haven't studied FastMM source code could you shed some light on the problem how a native heap can prevent fragmentation, ...
    (borland.public.delphi.non-technical)
  • Re: GC performance - GC fragility
    ... Think of a native heap which has ... 1000 entries of the type: ... {it's called heap fragmentation} ...
    (borland.public.delphi.non-technical)
  • Re: Multi-threading debugging
    ... Heap corruptions may appear as a result of multithreading: in cases when several threads touches unsyncronized data and make some operations having "bad results" because of absence of proper syncronization. ... MSG msg; ... The output window of VS2005 indicated that I had a critical section problem. ...
    (microsoft.public.win32.programmer.kernel)