How to check if an address is available for access?
Colleagues, I've been wanting to ask this question for many years.
If I access an address that is not part of the allocated memory area, for example, if I go beyond the boundaries of the allocated area, then I start having all sorts of nightmares - the program unloads an emergency memory dump, stops working, etc.
Is it possible, before accessing a certain pointer, to find out whether its value is associated with the allocated memory area? For example, a function like
?
I appreciate the answers,
Ogogon.
Colleagues, I've been wanting to ask this question for many years.
If I access an address that is not part of the allocated memory area, for example, if I go beyond the boundaries of the allocated area, then I start having all sorts of nightmares - the program unloads an emergency memory dump, stops working, etc.
Is it possible, before accessing a certain pointer, to find out whether its value is associated with the allocated memory area? For example, a function like
C:
int isalloc (void *ptr)
I appreciate the answers,
Ogogon.