Is there a best practice of any type in regards to using an explicit number for a pointer address safely? By that I mean the following example:
#define BASE_ADDRESS 0x10000
typedef struct my_var_list
{
int var1;
int var2;
} my_function_list;
my_var_list *MyVars;
MyVars = BASE_ADDRESS; // Set the address of MyVars to be 0x10000
This may demonstrate some ignorance on my part, but how can you guarantee that 0x10000 is not being used by something else at that time and you aren't causing memory corruption? If you can't assume that, is there any safe way of hard defining an address to use?