Re: Why sbrk clear the increased memory region

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 22, 2019 at 11:13:30AM +0800, 张忠山 wrote:
> Recently, I'm using barebox in a deep embedded project, and need some funtctions
> in libc/libm, So I linked barebox with newlib
> 
> But whenever newlib call sbrk with negtive `increment`, barebox crash.
> 
> The reason is sbrk clean memory region using `increment`.
> 
> Why sbrk must clear the increased memory region?

sbrk is used only for dlmalloc in barebox. AFAIK the dlmalloc
implementation needs the memory cleared. Also dlmalloxc probably never
calls sbrk with a negative increment, so this was never an issue.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux