mirror of https://gerrit.osmocom.org/libosmocore
Common library for all Osmocom projects (libosmocore, libosmogsm, libosmovty, libosmogb, libosmosim, libosmousb, ...)
https://osmocom.org/projects/libosmocore
3244702058
In the osmo-bts and libosmo-abis code the hexdump routine is used for every incoming/outgoing packet (including voice frames) and the usage of snprintf showed up inside profiles. There is a semantic change when more than 4096 characters are used. The code will now truncate at byte boundaries (and not nibbles). Code: static const int lengths[] = { 23, 1000, 52 }; char buf[4096]; int i; for (i = 0; i < 30000; ++i) char *res = osmo_hexdump(buf, lengths[i & 3]); Results: before: after: real 0m3.233s real 0m0.085s user 0m3.212s user 0m0.084s sys 0m0.000s sys 0m0.000s |
||
---|---|---|
debian | ||
doc | ||
include | ||
m4 | ||
src | ||
tests | ||
utils | ||
.gitignore | ||
COPYING | ||
Doxyfile.codec.in | ||
Doxyfile.core.in | ||
Doxyfile.gsm.in | ||
Doxyfile.vty.in | ||
Makefile.am | ||
configure.ac | ||
git-version-gen | ||
libosmocodec.pc.in | ||
libosmocore.pc.in | ||
libosmogb.pc.in | ||
libosmogsm.pc.in | ||
libosmovty.pc.in |