summaryrefslogtreecommitdiff
path: root/targets/instr_big.c
blob: ce899473043f8270c14b861ee9c68ffc59458831 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
// A megabyte set, then copied: a recording keeps the first 64 KiB of each
// write. Exits with the last byte copied.
#include <string.h>

static char from[1 << 20], to[1 << 20];

int main(void) {
    memset(from, 7, sizeof from);
    memcpy(to, from, sizeof to);
    return to[sizeof to - 1];
}