free()
- From: "dbansal" <bansal.dk@xxxxxxxxx>
- Date: 9 Feb 2007 23:45:46 -0800
Hi group,
I have a question to ask you all. I have allocated some chunk of
memory using ptr=(int*)malloc(). now I am trying to free that memory
using free((void*)ptr). My question is does free() make ptr NULL? If
not how do we know whether ptr memory has been freed already and we
should not try to free the same memory twice. Man pages does not tell
anything about this behavoiur.
Thanks,
.
- Follow-Ups:
- Re: free()
- From: HyperCube
- Re: free()
- From: Martin Ambuhl
- Re: free()
- From: Mark McIntyre
- Re: free()
- From: santosh
- Re: free()
- From: tphipps1
- Re: free()
- From: Richard Heathfield
- Re: free()
- From: Ian Collins
- Re: free()
- Prev by Date: Re: negate INT_MIN
- Next by Date: Re: free()
- Previous by thread: Implementing Realloc
- Next by thread: Re: free()
- Index(es):
Relevant Pages
|