Re: [PATCH 1/1] platform: optimize sysctl_set() to use stack allocated buffer

On Tue, 2016-02-23 at 23:54 +0100, Thomas Haller wrote:
The value written to sysctl is usually a short string. It makes sense
to optimize for this case and avoid allocating a temporary string
on the heap.

An alternative would be to use writev(), which effectively does the
and also creates a temporary buffer (preferably stack allocated).
 src/platform/nm-linux-platform.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)



Attachment: signature.asc
Description: This is a digitally signed message part

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]