home *** CD-ROM | disk | FTP | other *** search
- /*
- * ImageFX Development Header File
- * Copyright © 1991-1995 Nova Design, Inc.
- * Written by Thomas Krehbiel
- *
- * Memory Management.
- *
- */
-
- #ifndef SCAN_MEM_H
-
-
- #include <exec/types.h>
- #include <exec/memory.h>
-
- /*
- * ImageFX uses memory tracking routines for almost all of its memory
- * allocations. This means that if you allocate memory that is to be
- * freed by ImageFX (eg. a Mask structure), you MUST use these tracking
- * functions or it will be crash city (or at least memory leak city).
- *
- * ImageFX automatically frees any memory it tracks that is not freed
- * by the programmer. (This does not mean you shouldn't free it, though).
- *
- * You can enable using ImageFX memory tracking functions by defining
- * USE_IMAGEFX_MEMORY_ROUTINES before including this header file.
- * AllocMem()'s and FreeMem()'s will be converted to scan.library functions
- * DAlloc() and DFree() without you having to worry about them.
- *
- */
-
- /* Mem debug prototypes: */
- void DInitMem (void);
- void DCleanupMem (void);
-
- #ifdef USE_IMAGEFX_MEMORY_ROUTINES
-
- #define AllocMem(s,t) DAlloc((s),(t),__FILE__,NULL,__LINE__)
- #define FreeMem(p,s) DFree((p),(s),__FILE__,NULL,__LINE__)
-
- #define InitMem() DInitMem()
- #define Alloc(s,t) DAlloc((s),(t),__FILE__,NULL,__LINE__)
- #define Free(p,s) DFree((p),(s),__FILE__,NULL,__LINE__)
- #define FreeAll() DFreeAll()
- #define CleanupMem() DCleanupMem()
-
- #else
-
- #define Alloc(s,t) AllocMem((s),(t))
- #define Free(p,s) FreeMem((p),(s))
- #define InitMem() { }
- #define CleanupMem() { }
-
- #endif
-
-
- #define SCAN_MEM_H
- #endif
-