using free()

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jerico
    New Member
    • Sep 2006
    • 39

    #1

    using free()

    Hi.How does free() know how much memory is to be deallocated?Doe s it store this value?Thanks for help.

    Jerico
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    This is implementation dependent although I think it is probably safe to assume that the underlying system has a method to store the size of the allocated block.

    The are at least 2 different methods I can think of of doing this which probably means there are many more that I haven't thought of.

    Comment

    • dtimes6
      New Member
      • Oct 2006
      • 73

      #3
      Brian W. Kernighan and Dennis M. Ritchie, The C Programming Language Chapter 8

      Comment

      Working...