NetworkManager/shared/nm-glib-aux
Thomas Haller b26706ca49
shared: stack allocate GPollFD array in _ctx_integ_source_prepare()
The prepare() step of the GSource called frequently when the outer
GMainContext is preparing.

In the common case we have

  - few file descriptors in the inner context to track

  - the file descriptors don't change

We also need to consider whether the file descriptors change, because
some book-keeping is necessary when they do. But usually they don't
change.

Hence, let's optimize the prepare step to avoid a heap allocation
in the common case.

Also, because we use nm_utils_g_main_context_create_integrate_source()
with the internal GMainContext of NMClient. That context always has
a small number of file descriptors to track and it doesn't see much
change. In the vast majority of cases, the heap allocation can be
avoided.
2021-01-25 15:58:42 +01:00
..
tests shared: fix unit tests for nm_utils_get_next_realloc_size() 2021-01-12 09:56:43 +01:00
nm-c-list.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-dbus-aux.c all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-dbus-aux.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-dedup-multi.c all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-dedup-multi.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-enum-utils.c shared: fix _nm_utils_enum_from_str_full() for negative enum values 2021-01-15 09:36:30 +01:00
nm-enum-utils.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-errno.c all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-errno.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-glib.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-hash-utils.c all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-hash-utils.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-io-utils.c all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-io-utils.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-jansson.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-json-aux.c all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-json-aux.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-keyfile-aux.c all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-keyfile-aux.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-logging-base.c all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-logging-base.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-logging-fwd.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-macros-internal.h shared: add nm_strdup_maybe_a() helper macro 2021-01-15 09:36:30 +01:00
nm-obj.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-random-utils.c all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-random-utils.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-ref-string.c all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-ref-string.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-secret-utils.c all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-secret-utils.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-shared-utils.c shared: stack allocate GPollFD array in _ctx_integ_source_prepare() 2021-01-25 15:58:42 +01:00
nm-shared-utils.h shared: add NMOptionBool as alternative to NMTernary 2021-01-15 11:32:46 +01:00
nm-str-buf.h shared: add nm_str_buf_append_{dirty,c_len}() helpers 2021-01-14 10:38:52 +01:00
nm-time-utils.c all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-time-utils.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-value-type.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00