//This is the solution, but has been modied to ask you to ll
//the missing components instead of asking you to start from scratch
// The missing part is indicated by ______ with a yellow square
#include <stdlib.h>
#include <string.h>
#include "debugmalloc.h"
#include "dmhelper.h"
#include <stdio.h>
#dene ALIGN 8
#dene THEFENCE 0xDEADBEEF
#dene HEADERSIZE sizeof(struct header)
/* currently 12 bytes */
struct header {
int checksum;
size_t size; /* 4 bytes
size does not include header and footer */
int fence;
};
#dene FOOTERSIZE sizeof(struct footer)
/* currently 4 bytes */
struct footer {
int fence;
};
/* Global indicating # bytes allocated */
int allocatedSize = 0;
/* Linked list structure holding allocated block info */
typedef struct block_node block_list;
struct block_node {
void *ptr;
int size;
char *lename;
int linenum;
block_list *next;
};