mem: check if allocation size is too big