c - How could this happen when reading a socket with a error ENOMEM return -


error How can this be done when reading socket with ENOMEM returns? Man 2 read, I can not find any details about this error, someone can help me thanks. My Linux kernel 2.6.26-1-686

isomom

is an OS error code, As defined in Kern / include / kern / errno.h, which is returned due to inadequate memory

The name is the error no memory for the ENOMEM. One of the error codes returned by the fork () call means that no more storage space is available anymore. They are raised in relation to the socket when there is not enough resources available to make the socket. The value of the error code is 12.

You can handle this error instantly and release all the allocated resources as soon as possible, to avoid the need to allocate new resources.

Edit:

To obtain a data buffer, read the socket due to allocation and need to be free after your requirement. Also make sure that there is sufficient memory to return the error if failing to allocate memory.


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -