@@ -41,7 +41,8 @@ class classifier *analysis_init_from_archive(int verbosity,
4141 enum enc_key_type key_type,
4242 float fp_proc_threshold,
4343 float proc_dst_threshold,
44- bool report_os);
44+ bool report_os,
45+ bool minimize_ram=false );
4546
4647int analysis_finalize (classifier *c);
4748
@@ -104,9 +105,10 @@ class fingerprint_data {
104105 common_data *c,
105106 bool &malware_database,
106107 size_t total_cnt,
107- bool report_os
108+ bool report_os,
109+ bool minimize_ram
108110 ) :
109- classifier{process_info,total_cnt},
111+ classifier{process_info, total_cnt, minimize_ram },
110112 malware_db{malware_database},
111113 subnet_data_ptr{subnets},
112114 common{c},
@@ -535,7 +537,7 @@ class classifier {
535537 return (true );
536538 }
537539
538- void process_fp_db_line (std::string &line_str, bool report_os) {
540+ void process_fp_db_line (std::string &line_str, bool report_os, bool minimize_ram ) {
539541
540542 rapidjson::Document fp;
541543 fp.Parse (line_str.c_str ());
@@ -593,7 +595,8 @@ class classifier {
593595 &common,
594596 MALWARE_DB,
595597 total_count,
596- report_os
598+ report_os,
599+ minimize_ram
597600 );
598601
599602 if (fp.HasMember (" str_repr" ) && fp[" str_repr" ].IsString ()) {
@@ -655,7 +658,8 @@ class classifier {
655658 classifier (class encrypted_compressed_archive &archive,
656659 float fp_proc_threshold,
657660 float proc_dst_threshold,
658- bool report_os) : os_dictionary{}, subnets{}, fpdb{}, resource_version{} {
661+ bool report_os,
662+ bool minimize_ram) : os_dictionary{}, subnets{}, fpdb{}, resource_version{} {
659663
660664 // reserve attribute for encrypted_dns watchlist
661665 //
@@ -710,7 +714,7 @@ class classifier {
710714 if (threshold_set) {
711715 printf_err (log_debug, " loading fingerprint_db_lite.json\n " );
712716 while (archive.getline (line_str)) {
713- process_fp_db_line (line_str, report_os);
717+ process_fp_db_line (line_str, report_os, minimize_ram );
714718 }
715719 got_fp_db = true ;
716720 print_fp_counts ();
@@ -723,7 +727,7 @@ class classifier {
723727 else if (!threshold_set || lite_db || full_db) {
724728 printf_err (log_debug, " loading fingerprint_db.json\n " );
725729 while (archive.getline (line_str)) {
726- process_fp_db_line (line_str, report_os);
730+ process_fp_db_line (line_str, report_os, minimize_ram );
727731 }
728732 print_fp_counts ();
729733 }
0 commit comments