GNOME Bugzilla – Bug 680831
Deprecate and remove g_slice_[sg]et_config.*
Last modified: 2014-10-26 22:04:32 UTC
Really. Should have never made it to public headers to begin with. /* --- internal debugging API --- */ typedef enum { G_SLICE_CONFIG_ALWAYS_MALLOC = 1, G_SLICE_CONFIG_BYPASS_MAGAZINES, G_SLICE_CONFIG_WORKING_SET_MSECS, G_SLICE_CONFIG_COLOR_INCREMENT, G_SLICE_CONFIG_CHUNK_SIZES, G_SLICE_CONFIG_CONTENTION_COUNTER } GSliceConfig; void g_slice_set_config↦ (GSliceConfig ckey, gint64 value); gint64 g_slice_get_config↦ (GSliceConfig ckey); gint64* g_slice_get_config_state (GSliceConfig ckey, gint64 address, guint *n_values);
Rumour has it that this broke when I killed g_thread_init() and nobody even noticed...
The following fixes have been pushed: a74749d Deprecated GSlice config API 0b86626 configure.ac: Use AS_HELP_STRING throughout
Created attachment 220433 [details] [review] Deprecated GSlice config API This was marked as 'internal debugging' in the headers, and should have never been made public. As a first step to repair this, deprecate it.
Created attachment 220434 [details] [review] configure.ac: Use AS_HELP_STRING throughout
Review of attachment 220433 [details] [review]: ::: glib/tests/slice.c @@ +2,3 @@ +/* We test deprecated functionality here */ +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" Hmm...don't we have a wrapper for this? Actually, wouldn't it be better to do #define GLIB_VERSION_MIN_REQUIRED GLIB_2_32 ?
Review of attachment 220434 [details] [review]: This looks OK, though the commit message could have used a one-sentence rationale like "AC_HELP_STRING has been deprecated in autoconf" or something.
Mozilla Firefox uses this API with the following comment: // Disable the slice allocator, since jemalloc already uses similar layout // algorithms, and using a sub-allocator tends to increase fragmentation. Using G_SLICE=always-malloc instead is impractical; now every application executed by the browser will inherit this variable and behave differently. Please reconsider.