mandark_br <ma*****@rockpesado.com.br> wrote:
I have a function that returns a int pointer to a allocated memory.
How I know the size of this allocated memory?
Compiler = gcc
Ex.:
int main(void)
{
int *pointer;
pointer = fakefunc();
/* How I know the size of allocated memory?? */
return 0;
}
You can't, and you shouldn't need to. It is your responsibility to keep
track of how much memory 'fakefunc' allocates. If you can't do that in
your context, then show us a more concrete example.
--
Alex Monjushko (mo*******@hotmail.com)