/xbmc/visualizations/Goom/goom2k4-0/src/goomsl_heap.h

http://github.com/xbmc/xbmc · C++ Header · 29 lines · 11 code · 7 blank · 11 comment · 0 complexity · 6fa52753ff12f5e4d075e84b49daf2f6 MD5 · raw file

  1. #ifndef GOOMSL_HEAP
  2. #define GOOMSL_HEAP
  3. /**
  4. * Resizable Array that guarranty that resizes don't change address of
  5. * the stored datas.
  6. *
  7. * This is implemented as an array of arrays... granularity is the size
  8. * of each arrays.
  9. */
  10. typedef struct _GOOM_HEAP GoomHeap;
  11. /* Constructors / Destructor */
  12. GoomHeap *goom_heap_new(void);
  13. GoomHeap *goom_heap_new_with_granularity(int granularity);
  14. void goom_heap_delete(GoomHeap *_this);
  15. /* This method behaves like malloc. */
  16. void *goom_heap_malloc(GoomHeap *_this, int nb_bytes);
  17. /* This adds an alignment constraint. */
  18. void *goom_heap_malloc_with_alignment(GoomHeap *_this, int nb_bytes, int alignment);
  19. /* Returns a pointeur on the bytes... prefix is before */
  20. void *goom_heap_malloc_with_alignment_prefixed(GoomHeap *_this, int nb_bytes,
  21. int alignment, int prefix_bytes);
  22. #endif