1 #include <arpa/inet.h> 2 #include <cutils/sockets.h> 3 #include <fcntl.h> 4 #include <hardware/gralloc.h> 5 #include <sys/stat.h> 6 #include <sys/wait.h> 7 #include <unistd.h> 8 #include <algorithm> 9 #include <chrono> 10 #include <fstream> 11 #include <iostream> 12 #include <numeric> 13 #include <string> 14 #include <tuple> 15 #include <vector> 16 17 using namespace std; 18 19 #define BUFFER_SIZE (16 * 1024) 20 main(int,char **)21int main(int, char**) { 22 void* src = malloc(BUFFER_SIZE); 23 for (size_t i = 0; i < BUFFER_SIZE; i++) { 24 ((char*)src)[i] = (char)i; 25 } 26 void* dst = malloc(BUFFER_SIZE); 27 while (true) { 28 memcpy(dst, src, BUFFER_SIZE); 29 } 30 ((char*)dst)[0] = 0; 31 return 0; 32 } 33