home *** CD-ROM | disk | FTP | other *** search
- /* 'dosalloc.c' - dos-type allocation/deallocation. */
-
- #include <exec/types.h>
- #include <exec/memory.h>
- #include <proto/exec.h>
-
- #include <dossupport.h>
-
-
- void *dosalloc(long size){
- long *mem;
-
- if(!(mem=AllocMem(size+=4, MEMF_PUBLIC|MEMF_CLEAR )))
- return 0L;
-
- *mem++ = size;
- return mem;
- }
-
-
- void dosfree(void *mem){
- register long *mem2=mem;
-
- if(mem2){
- --mem2;
- FreeMem(mem2, *mem2);
- }
- }
-
- /* End of dosalloc.c */
-