[sr-dev] git:master:d3b3e87a: core: refactor PKG, SHM, and SYS* memory allocation error logging helper #defines

Henning Westerholt hw at kamailio.org
Sat Dec 29 01:55:48 CET 2018


Module: kamailio
Branch: master
Commit: d3b3e87a2d39992d1da291f552869f14375425de
URL: https://github.com/kamailio/kamailio/commit/d3b3e87a2d39992d1da291f552869f14375425de

Author: Henning Westerholt <hw at kamailio.org>
Committer: Henning Westerholt <hw at kamailio.org>
Date: 2018-12-29T01:50:19+01:00

core: refactor PKG, SHM, and SYS* memory allocation error logging helper #defines

- refactor PKG, SHM, and SYS* memory allocation error logging helper #defines
- replace *_SZ and *_MSG by *_FTM #defines, which accept variable parameters
- usage example: PKG_MEM_ERROR_FMT("for the record index %d\n", i);
- output: "could not allocate private memory from pkg pool - for the record index 2"
- because of the variable parameters you need to add a '\n' at the end

---

Modified: src/core/mem/pkg.h
Modified: src/core/mem/shm.h

---

Diff:  https://github.com/kamailio/kamailio/commit/d3b3e87a2d39992d1da291f552869f14375425de.diff
Patch: https://github.com/kamailio/kamailio/commit/d3b3e87a2d39992d1da291f552869f14375425de.patch




More information about the sr-dev mailing list