OK! Thank you.
But, then, there's must be a way for the program to control what memory is already being used.
How does the program know where it can allocate new memory?
Type: Posts; User: cris_orpi
OK! Thank you.
But, then, there's must be a way for the program to control what memory is already being used.
How does the program know where it can allocate new memory?
and what if function "foo" doesn't receive "len" value? Would there be a way, inside function "foo", of knowing the size of the memory pointed to pointer "p"? or, in another words, to have control of...
Actually, this is the way I allocate the memory assiated to pointer "p".
But, if I pass pointer "p" to a function, were I'm reading or writing information in the memory associated, can have any...
thank u for your answer
However, I think I must be missing something, or getting something wrong. Do you mean that the size of the allocated memory is stored in position -1?
Well, it sounds wierd...
Hello,
I've got a doubt I didn't find in books. Is there a way of knowing how much memory has been reserved for a pointer.
I guess, C must mark somehow the memory reserved for a pointer...