/** \brief print some host stats
* \warning Not thread safe */
-static void HostPrintStats (void)
+void HostPrintStats (void)
{
#ifdef HOSTBITS_STATS
SCLogInfo("hostbits added: %" PRIu32 ", removed: %" PRIu32 ", max memory usage: %" PRIu32 "",
hostbits_added, hostbits_removed, hostbits_memuse_max);
#endif /* HOSTBITS_STATS */
+ SCLogInfo("host memory usage: %llu bytes, maximum: %"PRIu64,
+ SC_ATOMIC_GET(host_memuse), host_config.memcap);
return;
}
((((uint64_t)SC_ATOMIC_GET(host_memuse) + (uint64_t)(size)) <= host_config.memcap))
#define HostIncrUsecnt(h) \
- SC_ATOMIC_ADD((h)->use_cnt, 1)
+ (void)SC_ATOMIC_ADD((h)->use_cnt, 1)
#define HostDecrUsecnt(h) \
- SC_ATOMIC_SUB((h)->use_cnt, 1)
+ (void)SC_ATOMIC_SUB((h)->use_cnt, 1)
#define HostReference(dst_h_ptr, h) do { \
if ((h) != NULL) { \
void HostClearMemory(Host *);
void HostMoveToSpare(Host *);
uint32_t HostSpareQueueGetSize(void);
+void HostPrintStats (void);
#endif /* __HOST_H__ */