blob: 381f41be74f2858437f19738cce52d30571f726a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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 <assert.h>
#include <stdlib.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
|