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?
if (node.connman) node.connman->Stop();
    StopTorControl();
    
    
    if (node.scheduler) node.scheduler->stop();
    if (node.chainman && node.chainman->m_load_block.joinable()) node.chainman->m_load_block.join();
    StopScriptCheckWorkerThreads();
    
    
    node.peerman.reset();
    node.connman.reset();
    node.banman.reset();
    node.addrman.reset();
    node.netgroupman.reset();
    if (node.mempool && node.mempool->GetLoadTried() && ShouldPersistMempool(*node.args)) {
        DumpMempool(*node.mempool, MempoolPath(*node.args));
    }
    
    if (node.fee_estimator) node.fee_estimator->Flush();
    
    if (node.chainman) {
        LOCK(cs_main);
        for (Chainstate* chainstate : node.chainman->GetAll()) {
            if (chainstate->CanFlushToDisk()) {
                chainstate->ForceFlushStateToDisk();
            }
        }
    }