also check available memory on reallocs and if it fails also call BBPtrim.
also check available memory on reallocs and if it fails also call BBPtrim.

zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb