commit | 41aca070e85258d9d47b0ac47f5eddece8bf45ba | [log] [tgz] |
---|---|---|
author | Aliaksey Kandratsenka <alk@tut.by> | Sun Aug 02 17:53:32 2015 |
committer | Aliaksey Kandratsenka <alk@tut.by> | Mon Aug 03 02:06:21 2015 |
tree | 0a4391a40199dbec9c4f1dc52118552fca116953 | |
parent | c4493874cd3b662d2778f3b79a3096ae61569b67 [diff] |
always set errno to ENOMEM on OOM condition and in single place While standards do not require us to set errno to ENOMEM in certain places (like posix_memalign), existing code may sometimes set it (i.e. because mmap or sbrk couldn't get memory from kernel) anyways. And from my reading of glibc, it's malloc is doing more or less same by just always setting ENOMEM on OOM condition. This commit also eliminates some functions (XXX_no_errno) that are not needed anymore.