I need to recode the free() func for educational purpose and it must be named free() also.
When i rename my function myfree() it work flawlessly but when i name it free() the program don’t know if he need to use mine or the system’s so the program just Segmentation fault(core dumped) even if i don’t call my free (just the declaration of another free() func seem to crash it)
so how can i tell the compiler to use mine instead of the system’s ?
thanks you in advance.
EDIT : Linux operating system
Basically, you have three options that I can see
#defineas @Mohamed suggests.