diff options
author | Pádraig Brady <P@draigBrady.com> | 2013-01-23 12:34:46 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2013-04-14 01:01:21 +0100 |
commit | 1fe218888aace1703f78e0af0059d7a15485bf7f (patch) | |
tree | 814d8ed411722cf1bb074fe5be861a4e4c7c9d6c /tests/pr/W35Ja3l24f-lm | |
parent | 8901e010fa24ba375d53e3e37fc7819621adcf19 (diff) | |
download | coreutils-1fe218888aace1703f78e0af0059d7a15485bf7f.tar.xz |
head: with --bytes=-N only allocate memory as needed
* src/head.c (elide_tail_bytes_pipe): Don't use calloc as that
bypasses memory overcommit due to the zeroing requirement.
Also realloc rather than malloc the pointer array to avoid
dependence on overcommit entirely.
* tests/misc/head-c.sh: Add a test case.
Fixes http://bugs.gnu.org/13530
Diffstat (limited to 'tests/pr/W35Ja3l24f-lm')
0 files changed, 0 insertions, 0 deletions