This is the mail archive of the glibc-linux@ricardo.ecn.wfu.edu mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: malloc problem/question in 2.1.3


    Mike> As a short aside, I think that this could be checked for in
    Mike> Perl using "defined" (e.g., if defined $var ...), however C
    Mike> is a compiled language and I don't think there's any such
    Mike> functionality, not afaik anyway.

One could implement this by writing a wrapper for malloc and free
which would do the accounting. Another way to do that is to put a
pointer to NULL directly after it is freed and it is even easier. Be
careful though to make this coherent with the whole code.



W


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]