I am implementing my own free using a static array of 1000 bytes for a problem.Two problems that can occur is if they passed in a parameter that isn't a pointer (char a; free((&a));)
since free takes in a void pointer(free(void*p))
.
Also, when the user doesn't malloc being used char * a; free(a);
. How would you suggest I check for these edge cases. I am aware that pointers have no information other than what they point too so I'm stumped on how I can differentiate whether something is a int being pointed to or just a regular int.