Thanks .. Actually why I am saying realloc can create the problem because
realloc will allocate the memory at any place of the memory chunks . It may
be possible if lots of user will allocate the memory and free the memory
then it may be possible to corruption of memory(i am in
thinking performance wise.)

Still I will do and test the scenarios.

-Ravi

On Thu, Oct 22, 2009 at 11:21 AM, johnmatthews2000 <[email protected]> wrote:

>
>
> --- In [email protected] <c-prog%40yahoogroups.com>, Ravi Mishra
> <ravics...@...> wrote:
> >
> > actually intally i don't know how much byte will allocate memory for
> > sturcture and second time i have to preserve the first user memory and
> > append second user allocate memory and so on.
>
> realloc sounds ideal:
> http://www.linuxmanpages.com/man3/realloc.3.php
>
> > Any other approach is there...
>
> Depends how you want to use your lists - the realloc method is simple but
> can be inefficient. You might consider using a linked list mechanism.
> http://en.wikipedia.org/wiki/List_(computing)
>
>  
>


[Non-text portions of this message have been removed]

Reply via email to