This is the mail archive of the
glibc-linux@ricardo.ecn.wfu.edu
mailing list for the glibc project.
Re: malloc problem/question in 2.1.3
- To: glibc-linux at ricardo dot ecn dot wfu dot edu
- Subject: Re: malloc problem/question in 2.1.3
- From: Wolfgang Sourdeau <wolfgang at iNsu dot com>
- Date: Thu, 1 Jun 2000 17:27:22 -0400 (EDT)
- Cc: glibc-linux at ricardo dot ecn dot wfu dot edu
- References: <200005312024.QAA05054@onsager.chem.mcgill.ca> <3936B426.392F5233@netrevolution.com>
- Reply-To: glibc-linux at ricardo dot ecn dot wfu dot edu
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