diff options
Diffstat (limited to 'include/alloc_header.h')
| -rw-r--r-- | include/alloc_header.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/alloc_header.h b/include/alloc_header.h new file mode 100644 index 0000000..bf4716c --- /dev/null +++ b/include/alloc_header.h @@ -0,0 +1,27 @@ +/* + * include/alloc_header.h + * + * liballoc memory block header type. + * CISC 301 -- Operating Systems, Project 3 + * + * Copyright (C) 2025 Douglas B. Rumbaugh <dbrumbaugh@harrisburgu.edu> + * + * Distributed under the Modified BSD License + * + */ +#ifndef H_LIBALLOC_HEADER +#define H_LIBALLOC_HEADER + +#include <stdlib.h> +#include <assert.h> + +#include "constants.h" + +typedef struct header { + size_t size; + size_t magic_number; +} header; + +static_assert(sizeof(header) % ALIGNMENT == 0, "Header improperly aligned"); + +#endif |