On Wednesday, 23 August 2017 02:42:12 PDT Iosif Hamlatzis wrote:
> I cannot understand why my system throws bad_alloc and reports there isn't
> enough memory to allocate. On a different terminal I display the memory
> consumption with: "watch -n 1 free -m" and I have: total       used       
> free  
>   shared    buffers     cached Mem:          1000        295        705    
>      0         21         85

First of all, are you sure you're seeing with enough granularity to catch the 
problem? Is it possible that there was a spike of less than 1 second which 
exhausted your available RAM, then caused the application to crash? After it 
crashes, all its memory is deallocated so free will report free memory.

If you are sure you are seeing valid values, then your system's calloc() has a 
bug. Is it a recent enough glibc? (as in, last two years)

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

_______________________________________________
iotivity-dev mailing list
[email protected]
https://lists.iotivity.org/mailman/listinfo/iotivity-dev

Reply via email to