#include "gstinfo.h"
#include "gstdata_private.h"
+#include "gstmemchunk.h"
#include "gstevent.h"
#include "gstlog.h"
static GstAllocTrace *_event_trace;
#endif
+static GstMemChunk *chunk;
+
/* #define MEMPROF */
GType _gst_event_type;
#ifndef GST_DISABLE_TRACE
_event_trace = gst_alloc_trace_register (GST_EVENT_TRACE_NAME);
#endif
+
+ chunk = gst_mem_chunk_new ("GstEventChunk", sizeof (GstEvent),
+ sizeof (GstEvent) * 50, 0);
}
static GstEvent*
{
GstEvent *copy;
- copy = g_new0(GstEvent, 1);
+ copy = gst_mem_chunk_alloc (chunk);
#ifndef GST_DISABLE_TRACE
gst_alloc_trace_new (_event_trace, copy);
#endif
#ifndef GST_DISABLE_TRACE
gst_alloc_trace_free (_event_trace, event);
#endif
-
- g_free (event);
+ gst_mem_chunk_free (chunk, event);
}
/**
{
GstEvent *event;
- event = g_new0(GstEvent, 1);
+ event = gst_mem_chunk_alloc0 (chunk);
#ifndef GST_DISABLE_TRACE
gst_alloc_trace_new (_event_trace, event);
#endif