separate allocators for static memory
Submitted by Stefan Sauer (gstreamer, gtkdoc dev)
Link to original bug (#573754)
Description
The idea is to provide api to gather static allocation in a separate memory pool/on separate memory pages. This could help with the memory fragmentations, as pages containing such allocations are not returned to the system untile the process is exiting.
API: g_static_malloc() g_static_malloc0() g_static_new() g_static_new0()
- no realloc, as then its not static anymore
- do we want _try variants? not really as we kind-of need those static allocs to function to function anyway
- we need g_static_slice_ variants as well
For g_slice it could use a separate pool. Not sure how to practically implement this for g_malloc and co.
Potential user for this api are e.g. GTypeInfo structures in GObject.