Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #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;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement