blob: 6954d313b032e5cd633ff2280f5fb10c3cb0445d [file] [log] [blame]
Tim Murrayeee2fd82022-11-04 14:46:25 -07001#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
17using namespace std;
18
19#define BUFFER_SIZE (2 * 1024 * 1024)
20
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}