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

Mike Frysinger vapier at gentoo.org
Mon Nov 15 22:52:53 CET 2010


On Monday, November 15, 2010 15:51:14 Kumar Gala wrote:
> returns memory ack to sbrk() via malloc_trim we could possible get

"ack" -> "back"

> The following code problems an example test to show the issue.

i dont understand this sentence

> we
> could possible get non-zero'd memory from sbrk() if it allocates back
> memory that was previously freed to it.
> 
> There are two possible solutions to this problem.
> 1. change #define MORECORE_CLEARS 0
> 2. memset to zero memory returned to sbrk.
> 
> We go with the second since the sbrk being called to free up memory
> should be pretty rare.
> 
> The following code problems an example test to show the issue.  This
> test code was inserted right after the call to mem_malloc_init().

this looks like the changelog is partially duplicated
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20101115/1238cc42/attachment.pgp 


More information about the U-Boot mailing list