summaryrefslogtreecommitdiff
path: root/lib/resource.h
diff options
context:
space:
mode:
authorJan Maria Matejka <mq@ucw.cz>2017-12-13 10:29:10 +0100
committerJan Maria Matejka <mq@ucw.cz>2017-12-13 10:29:10 +0100
commitcb21c5ffa92494b1a4bf110605509de3326b6c3d (patch)
treebd1c37b57c1d1aa45efecf4868ddf7d3ff27c489 /lib/resource.h
parent71c51aa4ab0daa3490f9a488f505eb25102c4705 (diff)
parent1e11918c8c56e3505193f4e6426c1a34aaae3941 (diff)
Merge branch 'int-new' of gitlab.labs.nic.cz:labs/bird into int-new
Diffstat (limited to 'lib/resource.h')
-rw-r--r--lib/resource.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/resource.h b/lib/resource.h
index 761c6adc..d9d4bb8f 100644
--- a/lib/resource.h
+++ b/lib/resource.h
@@ -59,11 +59,18 @@ void mb_free(void *);
typedef struct linpool linpool;
+typedef struct lp_state {
+ void *current, *large;
+ byte *ptr;
+} lp_state;
+
linpool *lp_new(pool *, unsigned blk);
void *lp_alloc(linpool *, unsigned size); /* Aligned */
void *lp_allocu(linpool *, unsigned size); /* Unaligned */
void *lp_allocz(linpool *, unsigned size); /* With clear */
void lp_flush(linpool *); /* Free everything, but leave linpool */
+void lp_save(linpool *m, lp_state *p); /* Save state */
+void lp_restore(linpool *m, lp_state *p); /* Restore state */
extern const int lp_chunk_size;
#define LP_GAS 1024