diff --git a/ChangeLog b/ChangeLog index 3b8879bfd3..55dc375a98 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2005-12-21 Matthias Clasen + * gdk/gdkregion-generic.c: Use the slice allocator + for regions. Still todo: avoid extra allocations for + the single-rectangle case. + * gtk/gtksettings.c (gtk_settings_class_init): Update class_n_properties after installing color-hash, since other classes install settings, too. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 3b8879bfd3..55dc375a98 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,9 @@ 2005-12-21 Matthias Clasen + * gdk/gdkregion-generic.c: Use the slice allocator + for regions. Still todo: avoid extra allocations for + the single-rectangle case. + * gtk/gtksettings.c (gtk_settings_class_init): Update class_n_properties after installing color-hash, since other classes install settings, too. diff --git a/gdk/gdkregion-generic.c b/gdk/gdkregion-generic.c index 1dbdc32fb9..a7bbeb0a6c 100644 --- a/gdk/gdkregion-generic.c +++ b/gdk/gdkregion-generic.c @@ -112,7 +112,7 @@ gdk_region_new () { GdkRegion *temp; - temp = g_new (GdkRegion, 1); + temp = g_slice_new (GdkRegion); temp->rects = g_new (GdkRegionBox, 1); temp->numRects = 0; @@ -143,7 +143,7 @@ gdk_region_rectangle (GdkRectangle *rectangle) if (rectangle->width <= 0 || rectangle->height <= 0) return gdk_region_new(); - temp = g_new (GdkRegion, 1); + temp = g_slice_new (GdkRegion); temp->rects = g_new (GdkRegionBox, 1); temp->numRects = 1; @@ -171,7 +171,7 @@ gdk_region_copy (GdkRegion *region) g_return_val_if_fail (region != NULL, NULL); - temp = g_new (GdkRegion, 1); + temp = g_slice_new (GdkRegion); temp->rects = g_new (GdkRegionBox, region->numRects); temp->numRects = region->numRects; @@ -330,7 +330,7 @@ gdk_region_destroy (GdkRegion *r) g_return_if_fail (r != NULL); g_free (r->rects); - g_free (r); + g_slice_free (GdkRegion, r); }