Re: help with huge memory consumption??



Rainer Weikusat <rainer.weikusat@xxxxxxxxx> wrote in part:
By definition, threads run in the same address space and each
thread as access to the memory all other threads have access
to, too (assuming it has a pointer pointing into first).

If all the memory is marked as shared (with the exception of
the stacks) this puts a lot of memory pressure on the heap.
A special thread-safe heap-only malloc() may be needed.

Bugs can also propagate since all threads can trample the heap.
It won't even stop buffer overflow exploits except to the extent
that more buffers wind up on the heap. And thread generation will
need to know how many bytes of params to copy to the new stack.

-- Robert


.



Relevant Pages

  • Re: Lcc-win32 extensions to C
    ... compiled with a C++ compiler or a C compiler. ... Yes, but if you do not use GC, you allocate more memory than needed to ... Using a non-GC'ed heap+ a GC'ed heap requires also more memory... ... Collector, since GC technologies are much more advanced than simple ...
    (comp.std.c)
  • Re: Huge pages and small pages. . .
    ... you need to have them cached in the TLB; if the TLB runs out of ... >>> low end of the heap, until someone figures out a way to tell the system ... >> causing them to be COW'd to real memory. ... I believe the swapper will kill them fast once you have ...
    (Linux-Kernel)
  • Re: Help wanted - problems with heap
    ... Memory pressure, because of limited heap size. ... identified that by failures to allocate memory. ... Any pointers as to work out what is happening would be welcome. ...
    (rec.games.roguelike.development)
  • RE: Defeating Microsoft Windows XP SP2 Heap protection
    ... Fact is XP SP2 is still far less likely to be vulnerable to buffer overflow ... > than the memory buffer allocated to hold it. ... > the operating system is now more careful to reduce both stack and heap ... > Execution Protection ...
    (microsoft.public.windowsxp.general)
  • Re: ASP.NET WP memory consumption problem & debugging on AppDomain bas
    ... Downloading Large Files Causes a Large Memory Loss and Causes the ... > Bytes in Loader Heap 46673920.000 ... > Promoted Finalization-Memory from Gen 1 0.000 ... > Working Set 648499200.000 ...
    (microsoft.public.dotnet.framework.aspnet)