[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re : [LI] free...
Hi,
Arun K Desai wrote:
>What "free" does???Suppose i am having a pointer say *ptr.
>If say free(ptr) what it does???
>If say ptr=NULL what it does???
>Is it both are same????
free : frees the memory space pointed to by ptr, which
must have been returned by a previous call to malloc(),
calloc() or realloc(). Otherwise, or if free(ptr) has
already been called before, undefined behaviour occurs.
If ptr is NULL, no operation is performed.
-Mahendra M
RV College of Engineering, B'lore.
--------------------------------------------------------------------
The Linux India Mailing List Archives are now available. Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.