DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Last mail (hopefully) on heaps! Thanks to all.

  1. #1
    Guest

    Last mail (hopefully) on heaps! Thanks to all.



    Hi Guys,

    Thanks for your helpful responses in this matter. I apologize for my obsession
    with heaps but it is so crucial to my work. I will try to stop harping on
    this issue and stop bugging you all about heaps as I am sure you all have
    better things to do! So here is a final query and a request if you can suggest
    a book for me to read on memory management.

    Checked addresses returned by new and they are indeed different! But does
    that realy mean my program should eventually crash? Actually I don't know
    EXACTLY how the compiler finds memory in the heap to assign space - but I
    imagined it would look for free space in the heap and allocate memory! My
    program tells me there should always be free space (as far as the amount
    required is concerned!) in each iteration! So I conclude that I am wrong
    in my understanding of memory assignment. The MSDN library doesn't seem to
    tell much (at least at my understanding level)!

    Thanks so much to Danny and Ralph for your patience.

    Sudipto.

  2. #2
    Ralph D. Cole Guest

    Re: Last mail (hopefully) on heaps! Thanks to all.


    <sudiptob@biostat.umn.edu> wrote:
    >
    >
    >Hi Guys,
    >
    >Thanks for your helpful responses in this matter. I apologize for my obsession
    >with heaps but it is so crucial to my work. I will try to stop harping on
    >this issue and stop bugging you all about heaps as I am sure you all have
    >better things to do! So here is a final query and a request if you can suggest
    >a book for me to read on memory management.
    >
    >Checked addresses returned by new and they are indeed different! But does
    >that realy mean my program should eventually crash? Actually I don't know
    >EXACTLY how the compiler finds memory in the heap to assign space - but

    I
    >imagined it would look for free space in the heap and allocate memory! My
    >program tells me there should always be free space (as far as the amount
    >required is concerned!) in each iteration! So I conclude that I am wrong
    >in my understanding of memory assignment. The MSDN library doesn't seem

    to
    >tell much (at least at my understanding level)!
    >
    >Thanks so much to Danny and Ralph for your patience.
    >
    >Sudipto.


    Check out my reply in c++.getting.started::Re: memory problems: Attn: Danny
    and Ralph

    When working with the VC++ Debug Heap routines and using algorithms that
    'tax' the limits of the defaults, you apparently will have to always increase
    the Linker Heap Option to some suitably high value or fiddle with the bits
    in the _crtDbgFlag flag.

    Memory/Heap management is implementation specific so by definition will vary
    between O/S's, and as we have just seen, between libraries as well.

    There is a ton of interesting information on memory management in Windows
    once you start looking for it. Take a look at the article "Managing Heap
    Memory in Win32" on the MSDN website (or on your MSDN CD) for a good starting
    point.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center