sbrk(2) question

Doug Gwyn gwyn at smoke.brl.mil
Mon Mar 11 08:20:39 AEST 1991


In article <1991Mar8.180132.12025 at Think.COM> barmar at think.com (Barry Margolin) writes:
>This question came up at work yesterday: when sbrk(2) is used to increase
>the size of the data segment, is the newly-allocated memory guaranteed to
>be empty?

You should not assume that.  If you want it to contain 0-valued bytes,
use memset() to fill it with 0 bytes.



More information about the Comp.unix.questions mailing list