This is a discussion on Re: malloc() does not set errno within the mailing.openbsd.tech forums, part of the OpenBSD category; --> In message <20030709.165958.104090837.hrs@eos.ocn.ne.jp> so spake Hiroki Sato (hrs): > I noticed that malloc() does not set errno=ENOMEM when the ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| In message <20030709.165958.104090837.hrs@eos.ocn.ne.jp> so spake Hiroki Sato (hrs): > I noticed that malloc() does not set errno=ENOMEM when the memory > cannot be allocated (although malloc(3) says ENOMEM is set in such case). > > The following patch should fix this. Or, did I miss something? malloc() uses brk(2) to allocate memory which does set errno. - todd |