use ilde0 more often
add checks for malloc.h and malloc_trim
add checks for malloc.h and malloc_trim
include sys/select and other headers required for select