libkworkspace: tuning glibc allocator
author Philipp Knechtges
()
committer Philipp Knechtges
()
commit 66b2cc4d31e380e3b2bc7e47477029fc39fb7ac7
tree 24810d85a84fa1d62606b16f011cda7ee889d3bf
parent 51bdd3bcd1cad9662149413035bd21ea4e59bc0c
libkworkspace: tuning glibc allocator

Some applications like kwin suffer from heap fragmentation
when using the raster graphicssystem. This patch provides a function
that forces glibc to shrink the heap more often.
Now 5*pagesize(=20kB on a typical x86 system) of unused space at the
end of the heap are enough to force free()
to release this space. The default threshold is 128kB which is too much
for an average kworkspace application.

REVIEW: 101385
(cherry picked from commit d8949d77b5bc33d540dc7f791cee3691ee9dbb85)
ConfigureChecks.cmake
config-workspace.h.cmake
kwin/main.cpp
libs/kworkspace/kworkspace.cpp
libs/kworkspace/kworkspace.h