Commits
Sandis Neilands authored 6bce9f66f31
...G...... [ZBXNEXT-494] improvements and fixes for issues found in code review Fixes: - in procstat_alloc() we have to take into account the passed size when checking whether there is enough space in dynamic shared memory segment; - taking into account alignment when calculating how much space is needed for the initial shared memory allocation in procstat_add(); - calling exit() from procstat_alloc() in case there is not enough space in dynamic shared memory segment (since callers reserve space before allocation). Coding improvements: - introduced new macros to improve readibility of the code; - split zbx_procstat_collect() into several shorter functions for improved readibility and debugging.