Added check available memory for instance buffer.