Changed text in settings window to more clearly explain what the max

frames / prealloc setting does, some other minor bug fixes and extra
comments in code.
This commit is contained in:
Collin Kidder
2023-02-13 19:17:44 -05:00
parent ba77154dc1
commit 4ecffaa76a
4 changed files with 9 additions and 3 deletions
+3
View File
@@ -61,6 +61,9 @@ CANFrameModel::CANFrameModel(QObject *parent)
QSettings settings;
preallocSize = settings.value("Main/MaximumFrames", maxFramesDefault).toInt();
//Each CANFrame object takes up 56 bytes and we're allocating two arrays here so take the
//# of pre-alloc frames and multiply by 112 to get the RAM usage. This is around 1GiB for the default.
//the goal is to prevent a reallocation from ever happening
frames.reserve(preallocSize);
filteredFrames.reserve(preallocSize);