1
/* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */
3
Interface definitions for bget.c, the memory management package.
4
* the memory management package.
6
7
typedef long bufsize;
9
struct bfhead *flink; /* Forward link */
10
struct bfhead *blink; /* Backward link */
10
struct bfhead *flink; ///< Forward link
11
struct bfhead *blink; ///< Backward link
13
/* Header in allocated and free buffers */
14
/** Header in allocated and free buffers */
16
bufsize prevfree; /* Relative link back to previous
17
free buffer in memory or 0 if
18
previous buffer is allocated. */
19
bufsize bsize; /* Buffer size: positive if free,
20
negative if allocated. */
17
* Relative link back to previous free buffer in memory or 0,
18
* if previous buffer is allocated.
21
/** Buffer size: positive if free, negative if allocated. */
22
24
#define BH(p) ((struct bhead *) (p))
24
/* Header in directly allocated buffers (by acqfcn) */
26
/** Header in directly allocated buffers (by acqfcn) */
27
bufsize tsize; /* Total size, including overhead */
28
struct bhead bh; /* Common header */
28
bufsize tsize; ///< Total size, including overhead
29
struct bhead bh; ///< Common header
30
31
#define BDH(p) ((struct bdhead *) (p))
32
/* Header in free buffers */
33
/** Header in free buffers */
35
struct bhead bh; /* Common allocated/free header */
36
struct qlinks ql; /* Links on free list */
36
struct bhead bh; ///< Common allocated/free header
37
struct qlinks ql; ///< Links on free list
38
39
#define BFH(p) ((struct bfhead *) (p))