i'm plotting real time usb-received data in Qt with Qcustomplot. for better speed, i want to allocate memory before data receive start. this is part of my code:
ui->plot_platform->graph(0)->data().data()->clear();
QVector<QCPGraphData> add_data(x);
ui->plot_platform->graph(0)->addData(add_data);
i do this at the start of data receiving. how i can determine size of x? it means how i can find max memory size that i can get from windows? is your solution safe from crashing?