top | item 45795113 (no title) gkfasdfasdf | 3 months ago Does Fil-C catch uninitialized memory reads? discuss order hn newest jitl|3 months ago malloc'd memory is zeroed in fil-c:> *zgc_alloc*> Allocate count bytes of zero-initialized memory. May allocate slightly more than count, based on the runtime's minalign (which is currently 16).> This is a GC allocation, so freeing it is optional. Also, if you free it and then use it, your program is guaranteed to panic.> libc's malloc just forwards to this. There is no difference between calling malloc and zgc_alloc.from https://fil-c.org/stdfil
jitl|3 months ago malloc'd memory is zeroed in fil-c:> *zgc_alloc*> Allocate count bytes of zero-initialized memory. May allocate slightly more than count, based on the runtime's minalign (which is currently 16).> This is a GC allocation, so freeing it is optional. Also, if you free it and then use it, your program is guaranteed to panic.> libc's malloc just forwards to this. There is no difference between calling malloc and zgc_alloc.from https://fil-c.org/stdfil
jitl|3 months ago
> *zgc_alloc*
> Allocate count bytes of zero-initialized memory. May allocate slightly more than count, based on the runtime's minalign (which is currently 16).
> This is a GC allocation, so freeing it is optional. Also, if you free it and then use it, your program is guaranteed to panic.
> libc's malloc just forwards to this. There is no difference between calling malloc and zgc_alloc.
from https://fil-c.org/stdfil