aboutsummaryrefslogtreecommitdiffstats
path: root/include/alloc_header.h
blob: bf4716c00d8859607d74559d5d7b73a028a14cb9 (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 <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