
Untitled
By: a guest on
Dec 22nd, 2011 | syntax:
C | size: 0.30 KB | hits: 19 | expires: Never
#include <unistd.h>
#define MSG "Look, I just made malloc not do memory allocations.\n" \
"How can the compiler tell whether the malloc function actually does allocate memory?\n"
void * malloc() {
write(2, MSG, sizeof(MSG));
return NULL;
}
int main() {
malloc();
return 0;
}