More questions on realloc - Thanks



Thanks everybody for your replies. I gather that:

a) How to obtain the size of the memory region pointed to by ptr in
realloc(ptr, size) is implementation-dependent.

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.


.



Relevant Pages

  • Re: More questions on realloc - Thanks
    ... >>> alone, without knowing the size of the memory region pointed to by ptr, is ... in standard C it's not possible. ...
    (comp.lang.c)
  • Re: effective Method to calculate n-th power
    ... >> which, knowing the order, can be 'simplified'. ... > order of g^x alone?? ... > Do you now see that we are given insufficient information? ... Prev by Date: ...
    (sci.math)
  • Re: More questions on realloc - Thanks
    ... >> alone, without knowing the size of the memory region pointed to by ptr, is ... in standard C it's not possible. ...
    (comp.lang.c)
  • Re: More questions on realloc - Thanks
    ... > alone, without knowing the size of the memory region pointed to by ptr, is ... in standard C it's not possible. ...
    (comp.lang.c)
  • Re: READ IT AND WEEP YOU POOR BASTARDS
    ... If that´s what you call knowing someone you are definitely without a ... doubt alone. ... There are no penny stock scams, douchebag, so if your premise is wrong, ... Prev by Date: ...
    (sci.energy.hydrogen)