pmt: fix memory leaks, and improve info function

- Removed --no-write-test argument of memory test function
 - Fixed memory leak of memory test function
 - Improved info function with using nlohmann/json header-only library
 - Some other improvents
This commit is contained in:
2025-08-14 12:56:29 +03:00
parent bf0df8cc83
commit 563e8a583e
12 changed files with 25795 additions and 48 deletions

View File

@@ -95,7 +95,7 @@ garbageCollector::~garbageCollector() {
close(fd);
for (const auto &fp : _fps)
fclose(fp);
for (const auto &file: _files)
for (const auto &file : _files)
eraseEntry(file);
}
@@ -105,7 +105,7 @@ void garbageCollector::delAfterProgress(char *&_ptr) {
void garbageCollector::delAfterProgress(uint8_t *&_ptr) {
_ptrs_u.push_back(_ptr);
}
void garbageCollector::delFileAfterProgress(const std::string_view path) {
void garbageCollector::delFileAfterProgress(const std::string &path) {
_files.push_back(path);
}
void garbageCollector::closeAfterProgress(const int _fd) {