Commit
f2d9857336261b76447a1ce231bae9d50988e9bd
by Pau Espin Pedrolgmstap_log: optimization: Add talloc_pool for transmitted messages
In synchronous modes (blocking and non-blocking), set a pool size of 1
msgb. This way we avoid re-allocating the msgb with malloc/free
everytime a gsmtap_log msg is transmitted over the target, and instead
we allocate the msgb during creation of the target.
In asynchronous mode (workqueue), create a pool of 100 msgbs, which
should in general be enough to speedup more usual needs. If more than
100 msgbs are to be enqueued into the gsmtap_inst, then they will be
allocated as normal talloc contexts.
Since the struct log_target is public, it is currently not possible to
add new fields to it under "tgt_gsmtap" without breaking the ABI. Hence,
the ->output field, which is unused in this target, is reused to store
the pool object internally.
Change-Id: I19cdf09f21d856e8e3646de495ce7ae040195268