S
sinbad
hi,
Is there any way to know if a byte of memory is allocated.
Does C allows me to write such a function, or Is there any other way
for
doing this. btw i am using gcc in linux; Here, the byte may not be
allocated
to this process but might be used by another process, even in that
case
i should get the result as alloced; Conversely is there a way to tell
malloc ()
that i need memory to be allocated at this memory location if
possible?
int main ()
{
if (is_alloced(0x3434453E))
do_something;
else
do_something_else;
return 0;
}
Is there any way to know if a byte of memory is allocated.
Does C allows me to write such a function, or Is there any other way
for
doing this. btw i am using gcc in linux; Here, the byte may not be
allocated
to this process but might be used by another process, even in that
case
i should get the result as alloced; Conversely is there a way to tell
malloc ()
that i need memory to be allocated at this memory location if
possible?
int main ()
{
if (is_alloced(0x3434453E))
do_something;
else
do_something_else;
return 0;
}