Brian Silverman | 2dfc9cf | 2017-02-19 14:20:40 -0800 | [diff] [blame] | 1 | #include <unistd.h> |
Brian Silverman | 516ceb2 | 2015-11-27 01:29:05 -0500 | [diff] [blame] | 2 | |
Tyler Chatow | bf0609c | 2021-07-31 16:13:27 -0700 | [diff] [blame^] | 3 | #include <cstdlib> |
| 4 | |
Brian Silverman | 92c3f1e | 2015-12-08 20:21:31 -0500 | [diff] [blame] | 5 | int main() { |
Brian Silverman | 2dfc9cf | 2017-02-19 14:20:40 -0800 | [diff] [blame] | 6 | void *big_chunk = malloc(500000 + read(-1, nullptr, 0)); |
| 7 | if (write(-1, big_chunk, 0) != -1) return 1; |
Brian Silverman | 92c3f1e | 2015-12-08 20:21:31 -0500 | [diff] [blame] | 8 | free(big_chunk); |
| 9 | } |