Re: Linked List & Dynamic Memory Allocation



Greetings,

I have everything working now. Thanks for your tips, suggestions and
guidance. I have better understanding of how programs relate to stack
and heap. I have created a singly linked list with dynamic memory
allocation enabled. Next task is doubly linked list but I've got a
good handle on that. One last question with this topic is, what
happens when memory allocated with malloc is not freed with free? I
am not seeing an immediate disaster when I deliberately leave out call
to free. And with every new record/item for which memory is allocated
do I need to call free( ) for every single memory allocation call or
just once? Thanks.

.



Relevant Pages

  • Question about heap vs stack allocation
    ... practical reason too) concerning memory allocation in a specific ... list of instances of that class (foo): ... is the list itself allocated on the heap or the ...
    (microsoft.public.vc.language)
  • Re: Basic, but what the hell am I doing wrong here?
    ... > clouding your understanding. ... > understading of memory allocation versus pointer definition. ... stringstream object or similar, which is much safer than ... calling malloc or new. ...
    (Debian-User)
  • Re: Basic, but what the hell am I doing wrong here?
    ... I can understand your confusion. ... clouding your understanding. ... understading of memory allocation versus pointer definition. ...
    (Debian-User)
  • Doubts on Defining and declaring variables
    ... Kindly Correct the places where my understanding is wrong. ... 2.Dim iage As Integer (My understanding:-Still No memory allocation ... What happens in case of arrays when I give dim arr?? ... How is the memory allocation done when we use Redim? ...
    (microsoft.public.scripting.vbscript)
  • static memory allocation versus dynamic memory allocation
    ... static memory allocation instead of dynamic memory allocation. ... understanding is that static memory allocation like using array is ... but dynamic memory allocation is more flexible. ...
    (comp.lang.c)