summaryrefslogtreecommitdiff
path: root/targets/instr_big.c
diff options
context:
space:
mode:
Diffstat (limited to 'targets/instr_big.c')
-rw-r--r--targets/instr_big.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/targets/instr_big.c b/targets/instr_big.c
new file mode 100644
index 0000000..ce89947
--- /dev/null
+++ b/targets/instr_big.c
@@ -0,0 +1,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];
+}