Re: doubt in do_brk code

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

 



On Sat, 13 Oct 2001, linux-newbie x wrote:
> 
> That is if an existing mmap exists in the 
> break area we return the old break value.
> So is this error to be handled by the code using brk()
> example malloc. 
> Should not an error like ENOMEM be sent?

	Current glibc implementations of malloc will use mmap to allocate
new heaps if brk() fails. The caller can tell the brk() failed because the
return address will not be the requested address, it will be the last brk
point.

	cheers, Adam

-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux