Re: [U-Boot] [PATCH v2] malloc: Fix issue with calloc memory possibly being non-zero

2010-11-17 Thread Wolfgang Denk
Dear Kumar Gala, In message <1289868103-7702-1-git-send-email-ga...@kernel.crashing.org> you wrote: > Since we set #define MORECORE_CLEARS 1, the code assumes 'sbrk' always > returns zero'd out memory. However since its possible that free() > returns memory back to sbrk() via malloc_trim we coul

[U-Boot] [PATCH v2] malloc: Fix issue with calloc memory possibly being non-zero

2010-11-15 Thread Kumar Gala
Since we set #define MORECORE_CLEARS 1, the code assumes 'sbrk' always returns zero'd out memory. However since its possible that free() returns memory back to sbrk() via malloc_trim we could possible get non-zero'd memory from sbrk(). This is a problem for when code might call calloc() and expec