regarding free
- From: sam_cit@xxxxxxxxxxx
- Date: 14 Jan 2007 00:16:55 -0800
Hi Everyone,
int main()
{
char *p = malloc(100);
p = "india"; //assuming p is not null
p++;
free(p);
}
How would free() behave when the address passed is different from the
one that was allocated... would it fail? would it be a memory leak?
.
- Follow-Ups:
- Re: regarding free
- From: Mark McIntyre
- Re: regarding free
- From: junky_fellow@xxxxxxxxxxx
- Re: regarding free
- From: David T. Ashley
- Re: regarding free
- From: Richard Heathfield
- Re: regarding free
- From: Ian Collins
- Re: regarding free
- Prev by Date: Re: pre-processor string replacement
- Next by Date: Re: pre-processor string replacement
- Previous by thread: pre-processor string replacement
- Next by thread: Re: regarding free
- Index(es):
Relevant Pages
|