This happens to me that my computer forces qt to exit because my disk is running out of memory

Should we skip syncing or check and show warning beforehand  when disk size available is enough for syncing all blocks?

Also wondering how large free disks should I prepare for syncing all the blocks?
{
    
    const fs::path& datadir = gArgs.GetDataDirNet();
    if (!DirIsWritable(datadir)) {
        return InitError(strprintf(_("Cannot write to data directory '%s'; check permissions."), fs::PathToString(datadir)));
    }
    if (!LockDirectory(datadir, ".lock", probeOnly)) {
        return InitError(strprintf(_("Cannot obtain a lock on data directory %s. %s is probably already running."), fs::PathToString(datadir), PACKAGE_NAME));
    }
    return true;
}
bool AppInitSanityChecks(const kernel::Context& kernel)
{
    
    if (auto error = kernel::SanityChecks(kernel)) {
        InitError(*error);
        return InitError(strprintf(_("Initialization sanity check failed. %s is shutting down."), PACKAGE_NAME));
    }
    
    
    
    return LockDataDirectory(true);
}
bool AppInitLockDataDirectory()