Question: what is xmalloc in c?
Answer: xmalloc() is a non-standard function that has the motto succeed or die. If it fails to allocate memory, it will terminate your program and print an error message to stderr . The allocation itself is no different; only the behaviour in the case that no memory could be allocated is different.