
15 Nov
2010
15 Nov
'10
10:52 p.m.
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.
- change #define MORECORE_CLEARS 0
- 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