summaryrefslogtreecommitdiff
path: root/frontends/amiga/memory.h
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/amiga/memory.h')
-rw-r--r--frontends/amiga/memory.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/frontends/amiga/memory.h b/frontends/amiga/memory.h
index 1c51f3081..63452f61a 100644
--- a/frontends/amiga/memory.h
+++ b/frontends/amiga/memory.h
@@ -21,8 +21,18 @@
#include <exec/types.h>
-/* Standard memory allocation */
-void *ami_misc_allocvec_clear(int size, UBYTE value);
+/* Alloc/free chip memory */
+#ifdef __amigaos4__
+#define ami_memory_chip_alloc(s) malloc(s)
+#define ami_memory_chip_free(p) free(p)
+#else
+#define ami_memory_chip_alloc(s) AllocVec(s, MEMF_CHIP)
+#define ami_memory_chip_free(p) FreeVec(p)
+#endif
+
+/* Alloc/free a block cleared to non-zero */
+void *ami_memory_clear_alloc(size_t size, UBYTE value);
+void ami_memory_clear_free(void *p);
/* Itempool cross-compatibility */
APTR ami_misc_itempool_create(int size);