I would like to indicate that it is not a ENOMEM problem, in transfer, it works.
When I ran the program in inteuppt mode, I had no such problem as one related to input / output ( errno = 16 ) . I have been trying all the addresses and maximum packet sizes, but having the same error...
I have checked my program with Valgrind/Valkyrie, and received an output indicating "...possibly lost in loss recods..." .
I have been searching for the solution of this problem. Could I ask you if anybody knows a solution for this problem? An example, web site, blog; I could learn reading if there is any useful link you could share.
I am guessing that you have some sort of memory leak or memory corruption. The out of memory error occurs either if you literally run out of memory (e.g., from a memory leak in a tight loop), or if you corrupted the heap completely (e.g., by freeing memory twice). From you valgrind tests, it would appear that you have a memory leak. In valgrind terminology, it reports "possibly lost" (or "definitely lost") for memory that has not been freed and no longer has any pointer to it, which is, by definition, a memory leak (you have memory that you cannot possibly deallocation since you no longer have a pointer to it).
Without showing us your code, there isn't much we can do to help. This is a case-by-case issue, so, there is no "solution". A memory leak generally comes from not calling "delete" on memory that you allocated with "new". Sometimes this is obvious (e.g., just forgot to put the delete), and sometimes it's less obvious (e.g., the delete is in a place that isn't reached by the execution under some or all circumstances). The general solution to solve that issue is to use RAII classes (or see wiki).