[evolution-data-server] CamelIMAPXJob: Allocate with g_slice_new().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] CamelIMAPXJob: Allocate with g_slice_new().
- Date: Fri, 2 Dec 2011 06:17:22 +0000 (UTC)
commit aef988535ad180c4c86fc307a2a0c866c41f24b5
Author: Matthew Barnes <mbarnes redhat com>
Date: Thu Dec 1 20:38:02 2011 -0600
CamelIMAPXJob: Allocate with g_slice_new().
Slab allocator is more efficient for fixed-size structs.
camel/providers/imapx/camel-imapx-server.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index ad7fe17..6a1c877 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -2187,7 +2187,7 @@ imapx_job_new (GCancellable *cancellable)
if (cancellable != NULL)
g_object_ref (cancellable);
- job = g_malloc0 (sizeof (CamelIMAPXJob));
+ job = g_slice_new0 (CamelIMAPXJob);
job->done_cond = g_cond_new ();
job->done_mutex = g_mutex_new ();
job->cancellable = cancellable;
@@ -2212,7 +2212,7 @@ imapx_job_free (CamelIMAPXJob *job)
g_object_unref (job->cancellable);
}
- g_free (job);
+ g_slice_free (CamelIMAPXJob, job);
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]