#define MEMBITS (MEMCLUMPSIZE / MEMUNIT)
#define MEMBITINTS (MEMBITS / 32)
-#define MEMHEADER_SENTINEL 0xABADCAFE
-#define MEMCLUMP_SENTINEL 0xDEADF00D
+#define MEMHEADER_SENTINEL1 0xDEADF00D
+#define MEMHEADER_SENTINEL2 0xDF
+#define MEMCLUMP_SENTINEL 0xABADCAFE
typedef struct memheader_s
{
// file name and line where Mem_Alloc was called
char *filename;
int fileline;
- // should always be MEMHEADER_SENTINEL
+ // should always be MEMHEADER_SENTINEL1
int sentinel1;
- // immediately followed by data, which is followed by another MEMHEADER_SENTINEL
+ // immediately followed by data, which is followed by a MEMHEADER_SENTINEL2 byte
}
memheader_t;
typedef struct memclump_s
{
// contents of the clump
- byte block[MEMCLUMPSIZE];
+ qbyte block[MEMCLUMPSIZE];
// should always be MEMCLUMP_SENTINEL
int sentinel1;
// if a bit is on, it means that the MEMUNIT bytes it represents are