memory handling routines
[swftools.git] / lib / mem.h
diff --git a/lib/mem.h b/lib/mem.h
new file mode 100644 (file)
index 0000000..d7a4bfe
--- /dev/null
+++ b/lib/mem.h
@@ -0,0 +1,13 @@
+#ifndef __mem_h__
+#define __mem_h__
+
+#define ALLOC_ARRAY(type, num) (((type)*)rfxalloc(sizeof(type)*(num)))
+void* rfx_alloc(int size);
+void* rfx_calloc(int size);
+void* rfx_realloc(void*data, int size);
+void rfx_free(void*data);
+#ifdef MEMORY_INFO
+long rfx_memory_used();
+char* rfx_memory_used_str();
+#endif
+#endif //__mem_h__