On Thu, Jun 26, 2014 at 10:09 AM, Ted Unangst <t...@tedunangst.com> wrote: > On Thu, Jun 26, 2014 at 08:33, sven falempin wrote: > >> For a review i dislike >> + unsigned char stdinbuf[BUFSIZE]; >> and the memmove on it: >> >> Dear tech savvy, isn it better to malloc a buffer like this instead of >> alloca it ? >> or just a static buffer would be better so it is in the program mem space ? > > No, there's nothing wrong with a stack buffer of moderate size in a > program like this. We don't use alloca() much though.
Ted, What is a 'good maximum' size for a buffer like this in amd64 world and arm ? >From which amount should we consider to not use the stack. (I know it depends the type of function, but lets focus on this case ) Cheers. -- --------------------------------------------------------------------------------------------------------------------- () ascii ribbon campaign - against html e-mail /\