summaryrefslogtreecommitdiffstats
path: root/src/memblock.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/memblock.h')
-rw-r--r--src/memblock.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/memblock.h b/src/memblock.h
index 48e87286..c0fb6708 100644
--- a/src/memblock.h
+++ b/src/memblock.h
@@ -2,6 +2,7 @@
#define foomemblockhfoo
#include <sys/types.h>
+#include <inttypes.h>
enum memblock_type { MEMBLOCK_FIXED, MEMBLOCK_APPENDED, MEMBLOCK_DYNAMIC };
@@ -10,6 +11,7 @@ struct memblock {
unsigned ref;
size_t length;
void *data;
+ struct timeval stamp;
};
struct memchunk {
@@ -26,6 +28,11 @@ struct memblock* memblock_ref(struct memblock*b);
void memblock_unref_fixed(struct memblock*b);
+void memblock_stamp(struct memblock*b);
+uint32_t memblock_age(struct memblock*b);
+
#define memblock_assert_exclusive(b) assert((b)->ref == 1)
+extern unsigned n_blocks;
+
#endif