bspwm: Memory leak when openning many tabs

Experiment

  1. Measure memory usage after boot (in my case it is ~800M)
  2. Hold win+Enter for a while
  3. Obviously, your memory usage will grow (in my case it becomes ~5000M)
  4. Then kill all opened terminal windows
  5. Get memory usage larger then at the start (in my case 1800)

Question

How to fix it?

About this issue

Most upvoted comments

I stopped using Alacritty because of these memory leaks. I think that this is not BSPWM problem at all.

Try reproducing this with a minimal amount of external factors: for example when picom & polybar are not running.

Which processes are actually using more memory?

Also, i’ve tried to measure memory usage by htop, but it is very strange that it doesnt show all of memory consumers. For examle, when I was fixing my picom (by the way it was about memory consumption too) I tried to analyze memory usage in htop too, but it was showing that everything was ok. The problem was in the fact that picom was rerendering window again and again, so my memory said goodbye. It makes me mad sometimes when htop hides some essential information from me