Are reverse-complement programs allowed to determine input size?
QUESTION
Is it allowed for the reverse-complement programs to determine the size of the input by getting the amount of data available in stdin? And another closely related question, if programs are allowed to get the size of the input, are they then allowed to use that information in order to immediately make large memory allocations and reads of stdin? Doing so would seem to go against the rules that say you are supposed to "grow the data" and "don't get the size and make a single allocation" but the rules also say that you are supposed to "read [the input] line-by-line" yet most of the programs do reads by well over several kilobytes of data at a time.
See the Java #6 and #7 programs for examples of what I'm talking about. These two programs get the size of the input and then make only a single large memory allocation and read of stdin.
I tried changing the C #8 and #2 programs to also get the input size so they too could also make large allocations and reads and at least on a typical Linux system it seemed to have no noticeable impact on the run time, CPU time, or resident memory usage plus it has the additional downside of causing problems if stdin is a pipe instead of a redirected file. I think being able to get the input size could possibly help out in some other programming languages though (I think this could be helpful for example if a program might want to have several processes using shared memory).