Re: will I get Memory leak..
- From: Mark Bluemel <mark_bluemel@xxxxxxxxx>
- Date: Wed, 14 Nov 2007 13:32:04 +0000
gNash wrote:
Could you any one please tell me how is free() is working?
If passed a pointer to a piece of memory which was allocated with
malloc(), calloc() or realloc(), which has not already been freed by a
call to free() or realloc, free() returns that memory to the pool which
malloc() etc allocate from.
if passed a NULL pointer, free() does nothing.
If passed any other pointer, the behaviour is undefined.
If you want to know how free() accomplishes this, you are asking about
the implementation details, which differ - you'd have to refer to the
source code for a specific malloc()/calloc()/realloc()/free()
implementation.
.
- References:
- will I get Memory leak..
- From: gNash
- Re: will I get Memory leak..
- From: Ben Bacarisse
- Re: will I get Memory leak..
- From: gNash
- will I get Memory leak..
- Prev by Date: Re: will I get Memory leak..
- Next by Date: Re: will I get Memory leak..
- Previous by thread: Re: will I get Memory leak..
- Next by thread: Re: will I get Memory leak..
- Index(es):
Relevant Pages
|