Use more explicit types instead.
(void) SC_ATOMIC_ADD(defrag_memuse, (defrag_config.hash_size * sizeof(DefragTrackerHashRow)));
if (quiet == FALSE) {
- SCLogConfig("allocated %llu bytes of memory for the defrag hash... "
+ SCLogConfig("allocated %"PRIu64" bytes of memory for the defrag hash... "
"%" PRIu32 " buckets of size %" PRIuMAX "",
SC_ATOMIC_GET(defrag_memuse), defrag_config.hash_size,
(uintmax_t)sizeof(DefragTrackerHashRow));
}
if (quiet == FALSE) {
- SCLogConfig("defrag memory usage: %llu bytes, maximum: %"PRIu64,
+ SCLogConfig("defrag memory usage: %"PRIu64" bytes, maximum: %"PRIu64,
SC_ATOMIC_GET(defrag_memuse), defrag_config.memcap);
}
((((uint64_t)SC_ATOMIC_GET(defrag_memuse) + (uint64_t)(size)) <= defrag_config.memcap))
DefragConfig defrag_config;
-SC_ATOMIC_DECLARE(unsigned long long int,defrag_memuse);
+SC_ATOMIC_DECLARE(uint64_t,defrag_memuse);
SC_ATOMIC_DECLARE(unsigned int,defragtracker_counter);
SC_ATOMIC_DECLARE(unsigned int,defragtracker_prune_idx);
FlowConfig flow_config;
/** flow memuse counter (atomic), for enforcing memcap limit */
-SC_ATOMIC_DECLARE(long long unsigned int, flow_memuse);
+SC_ATOMIC_DECLARE(uint64_t, flow_memuse);
#endif /* __FLOW_PRIVATE_H__ */
(void) SC_ATOMIC_ADD(flow_memuse, (flow_config.hash_size * sizeof(FlowBucket)));
if (quiet == FALSE) {
- SCLogConfig("allocated %llu bytes of memory for the flow hash... "
+ SCLogConfig("allocated %"PRIu64" bytes of memory for the flow hash... "
"%" PRIu32 " buckets of size %" PRIuMAX "",
SC_ATOMIC_GET(flow_memuse), flow_config.hash_size,
(uintmax_t)sizeof(FlowBucket));
if (quiet == FALSE) {
SCLogConfig("preallocated %" PRIu32 " flows of size %" PRIuMAX "",
flow_spare_q.len, (uintmax_t)(sizeof(Flow) + + FlowStorageSize()));
- SCLogConfig("flow memory usage: %llu bytes, maximum: %"PRIu64,
+ SCLogConfig("flow memory usage: %"PRIu64" bytes, maximum: %"PRIu64,
SC_ATOMIC_GET(flow_memuse), flow_config.memcap);
}
(void) SC_ATOMIC_ADD(host_memuse, (host_config.hash_size * sizeof(HostHashRow)));
if (quiet == FALSE) {
- SCLogConfig("allocated %llu bytes of memory for the host hash... "
+ SCLogConfig("allocated %"PRIu64" bytes of memory for the host hash... "
"%" PRIu32 " buckets of size %" PRIuMAX "",
SC_ATOMIC_GET(host_memuse), host_config.hash_size,
(uintmax_t)sizeof(HostHashRow));
if (quiet == FALSE) {
SCLogConfig("preallocated %" PRIu32 " hosts of size %" PRIu16 "",
host_spare_q.len, g_host_size);
- SCLogConfig("host memory usage: %llu bytes, maximum: %"PRIu64,
+ SCLogConfig("host memory usage: %"PRIu64" bytes, maximum: %"PRIu64,
SC_ATOMIC_GET(host_memuse), host_config.memcap);
}
SCLogPerf("hostbits added: %" PRIu32 ", removed: %" PRIu32 ", max memory usage: %" PRIu32 "",
hostbits_added, hostbits_removed, hostbits_memuse_max);
#endif /* HOSTBITS_STATS */
- SCLogPerf("host memory usage: %llu bytes, maximum: %"PRIu64,
+ SCLogPerf("host memory usage: %"PRIu64" bytes, maximum: %"PRIu64,
SC_ATOMIC_GET(host_memuse), host_config.memcap);
return;
}
} while (0)
HostConfig host_config;
-SC_ATOMIC_DECLARE(unsigned long long int,host_memuse);
-SC_ATOMIC_DECLARE(unsigned int,host_counter);
-SC_ATOMIC_DECLARE(unsigned int,host_prune_idx);
+SC_ATOMIC_DECLARE(uint64_t,host_memuse);
+SC_ATOMIC_DECLARE(uint32_t,host_counter);
+SC_ATOMIC_DECLARE(uint32_t,host_prune_idx);
void HostInitConfig(char quiet);
void HostShutdown(void);
(void) SC_ATOMIC_ADD(ippair_memuse, (ippair_config.hash_size * sizeof(IPPairHashRow)));
if (quiet == FALSE) {
- SCLogConfig("allocated %llu bytes of memory for the ippair hash... "
+ SCLogConfig("allocated %"PRIu64" bytes of memory for the ippair hash... "
"%" PRIu32 " buckets of size %" PRIuMAX "",
SC_ATOMIC_GET(ippair_memuse), ippair_config.hash_size,
(uintmax_t)sizeof(IPPairHashRow));
if (quiet == FALSE) {
SCLogConfig("preallocated %" PRIu32 " ippairs of size %" PRIu16 "",
ippair_spare_q.len, g_ippair_size);
- SCLogConfig("ippair memory usage: %llu bytes, maximum: %"PRIu64,
+ SCLogConfig("ippair memory usage: %"PRIu64" bytes, maximum: %"PRIu64,
SC_ATOMIC_GET(ippair_memuse), ippair_config.memcap);
}
SCLogPerf("ippairbits added: %" PRIu32 ", removed: %" PRIu32 ", max memory usage: %" PRIu32 "",
ippairbits_added, ippairbits_removed, ippairbits_memuse_max);
#endif /* IPPAIRBITS_STATS */
- SCLogPerf("ippair memory usage: %llu bytes, maximum: %"PRIu64,
+ SCLogPerf("ippair memory usage: %"PRIu64" bytes, maximum: %"PRIu64,
SC_ATOMIC_GET(ippair_memuse), ippair_config.memcap);
return;
}
} while (0)
IPPairConfig ippair_config;
-SC_ATOMIC_DECLARE(unsigned long long int,ippair_memuse);
-SC_ATOMIC_DECLARE(unsigned int,ippair_counter);
-SC_ATOMIC_DECLARE(unsigned int,ippair_prune_idx);
+SC_ATOMIC_DECLARE(uint64_t,ippair_memuse);
+SC_ATOMIC_DECLARE(uint32_t,ippair_counter);
+SC_ATOMIC_DECLARE(uint32_t,ippair_prune_idx);
void IPPairInitConfig(char quiet);
void IPPairShutdown(void);
SCLogInfo ("Illegal core dump size: %s.", dump_size_config);
return 0;
}
- SCLogInfo ("Max dump is %llu", (unsigned long long) max_dump);
+ SCLogInfo ("Max dump is %"PRIu64, (uint64_t) max_dump);
}
#if defined OS_WIN32
new_lim.rlim_max = lim.rlim_max;
}
if (setrlimit (RLIMIT_CORE, &new_lim) == 0) {
- SCLogInfo ("Core dump setting attempted is %llu", (unsigned long long) new_lim.rlim_cur);
+ SCLogInfo ("Core dump setting attempted is %"PRIu64, (uint64_t) new_lim.rlim_cur);
struct rlimit actual_lim;
if (getrlimit (RLIMIT_CORE, &actual_lim) == 0) {
if (actual_lim.rlim_cur == RLIM_INFINITY) {
}
#endif
else {
- SCLogInfo ("Core dump size set to %llu", (unsigned long long) actual_lim.rlim_cur);
+ SCLogInfo ("Core dump size set to %"PRIu64, (uint64_t) actual_lim.rlim_cur);
}
}
return 1;