libumem/hello.c

18 lines
332 B
C
Raw Permalink Normal View History

2020-06-24 14:33:13 +00:00
#include <stdio.h>
#include <stdlib.h>
int main() {
char *ptr = (char *)malloc(4096);
snprintf(ptr, 4096, "%s", "Hello, World!");
printf("%s 0x%p\n", ptr, ptr);
return 0;
}
/*
* Local variables:
* tab-width:4
* compile-command: "gcc -fpic -Wall -Werror -Ofast -march=native -mtune=native hello.c -o hello"
* End:
*/