[systemd-devel] [PATCH 2/2] RFC: journald: Do not dynamically allocate _UID/_GID/_PID strings

Lennart Poettering lennart at poettering.net
Mon Apr 8 06:51:39 PDT 2013


On Sat, 06.04.13 10:20, Holger Hans Peter Freyther (holger at freyther.de) wrote:

> Avoid the dynamic allocation for the _UID, _GID, and _PID strings.
> The maximum size of the string can be determined at compile time.
> 
> The code has only been compile tested.

Applied this one too. Made three more changes similar to this one, for
the source timestamp, and the machine and boot ids. (The latter could
actually could get rid of almost entirely btw, because they are
guaranteed to be constant on each boot and hence could be
precalculated... But then again, they don't even involve snprintf()
anymore now, so it might not be worth it...

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list