Re: kernel memory issue using malloc()

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

 



You never check the return value of malloc, it's not guaranteed to give
you back the amount you requested.

Malloc will either give you the whole amount of memory you requested,
or it won't give any memory at all. There's no mid way path.

Thanks,

Rajat

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[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