home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d5xx
/
d500
/
wiconify.lha
/
wIconify
/
wIconSetter.lzh
/
wIconSetter
/
Source
/
wMemory.h
< prev
next >
Wrap
C/C++ Source or Header
|
1991-04-19
|
371b
|
15 lines
/*
* Helpfull macros for memory allocation
*/
#include <exec/memory.h>
#define MEMFLAGS MEMF_CLEAR
#define NEWSTRUCT(s,p) (p=(struct s *)AllocMem(sizeof(struct s),MEMFLAGS))
#define FREESTRUCT(s,p) (FreeMem(p,sizeof(struct s)))
#define NEWCHAR(p,n) (p=(char *)AllocMem(n+1,MEMFLAGS))
#define FREECHAR(p) (FreeMem(p,strlen(p)+1))
extern APTR AllocMem();