In C, if I malloc(N)
a buffer, for what operations is that buffer valid? E.g.
- a buffer starting at
malloc(N)
is invalid for reads until initialized - a buffer starting at
malloc(N)
is valid for writes of at least sizeN
(but maybe greater).
In C, if I malloc(N)
a buffer, for what operations is that buffer valid? E.g.
malloc(N)
is invalid for reads until initializedmalloc(N)
is valid for writes of at least size N
(but maybe greater).