summaryrefslogtreecommitdiffstats
path: root/gst/goom/goomsl_heap.h
diff options
context:
space:
mode:
Diffstat (limited to 'gst/goom/goomsl_heap.h')
-rw-r--r--gst/goom/goomsl_heap.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/gst/goom/goomsl_heap.h b/gst/goom/goomsl_heap.h
new file mode 100644
index 00000000..a22bac69
--- /dev/null
+++ b/gst/goom/goomsl_heap.h
@@ -0,0 +1,29 @@
+#ifndef GOOMSL_HEAP
+#define GOOMSL_HEAP
+
+/**
+ * Resizable Array that guarranty that resizes don't change address of
+ * the stored datas.
+ *
+ * This is implemented as an array of arrays... granularity is the size
+ * of each arrays.
+ */
+
+typedef struct _GOOM_HEAP GoomHeap;
+
+/* Constructors / Destructor */
+GoomHeap *goom_heap_new(void);
+GoomHeap *goom_heap_new_with_granularity(int granularity);
+void goom_heap_delete(GoomHeap *_this);
+
+/* This method behaves like malloc. */
+void *goom_heap_malloc(GoomHeap *_this, int nb_bytes);
+/* This adds an alignment constraint. */
+void *goom_heap_malloc_with_alignment(GoomHeap *_this, int nb_bytes, int alignment);
+
+/* Returns a pointeur on the bytes... prefix is before */
+void *goom_heap_malloc_with_alignment_prefixed(GoomHeap *_this, int nb_bytes,
+ int alignment, int prefix_bytes);
+
+#endif
+