mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2025-10-19 10:23:17 +00:00

ClamD's STATS API reports process memory stats on systems that provide the `mallinfo()` system call. This feature is used by ClamDTOP to show process memory usage. When we switched to the CMake build system, we neglected to add the check for the `mallinfo()` system call and so broke ClamD memory usage reporting. This commit adds the CMake check for `mallinfo()` and sets HAVE_MALLINFO, if found. Fixes: https://github.com/Cisco-Talos/clamav/issues/706 Jira: CLAM-2742
8 lines
95 B
C
8 lines
95 B
C
#include <malloc.h>
|
|
|
|
int main()
|
|
{
|
|
struct mallinfo mi;
|
|
mi = mallinfo();
|
|
return 0;
|
|
}
|