Re: More questions on realloc - Thanks
- From: "S.Tobias" <siXtY@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: 29 Nov 2005 21:04:24 GMT
James S. Singleton <pt109@xxxxxxxxxx> wrote:
> b) Implementing realloc(ptr, size) using malloc(), memcpy() and free()
> alone, without knowing the size of the memory region pointed to by ptr, is
> just not possible.
True, in standard C it's not possible.
But note that `malloc' and `free' are redundant and can be implemented
in terms of `realloc'.
--
Stan Tobias
mailx `echo siXtY@xxxxxxxxxxxxxxxxxxxxxxxxxx | sed s/[[:upper:]]//g`
.
- Follow-Ups:
- Re: More questions on realloc - Thanks
- From: Jordan Abel
- Re: More questions on realloc - Thanks
- References:
- More questions on realloc - Thanks
- From: James S. Singleton
- More questions on realloc - Thanks
- Prev by Date: Re: Read dynamic string
- Next by Date: Re: How to redefine arithmetic operators.
- Previous by thread: Re: More questions on realloc - Thanks
- Next by thread: Re: More questions on realloc - Thanks
- Index(es):
Relevant Pages
|