My KWIN fork where I work on features like per-output virtual desktops
Find a file
Vlad Zahorodnii 00f112f48a Allocate less memory for every wl_callback
wl_callback and wl_region are two kinds of objects that are frequently
allocated.

Currently, we make two extra heap allocations per each wl_callback
object. One for the wrapper object (FrameCallback) and the other one is
for its Resource.

With this change, no extra allocations will be made. Also, due to
relying on wl_resource linked lists, the destroy listener implementation
got much simpler.

This won't result in huge memory usage or performance improvements, but
still it's worth reducing the number of memory allocations where possible.
2021-07-29 10:21:13 +03:00
src/wayland Allocate less memory for every wl_callback 2021-07-29 10:21:13 +03:00