hungry-birds icon indicating copy to clipboard operation
hungry-birds copied to clipboard

Confirmation of malloc is still necessary or not?

Open wantingchen opened this issue 9 years ago • 1 comments

If I understand well, malloc never fails due to overcommit in Linux. http://www.etalabs.net/overcommit.html

wantingchen avatar Jul 28 '16 09:07 wantingchen

It depends on OOM killer and virtual memory behavior of Linux kernel. Instead of checking the result value of malloc, I would like to introduce an efficient way to validate each allocated memory chunk by checking the magic number.

jserv avatar Jul 28 '16 14:07 jserv