aboutsummaryrefslogtreecommitdiffstats
path: root/lpsm.h
blob: a6c08ac2d0d0fcad9bbd16ae0b467f8b9ecfef8b (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ident "$Id$"
/* ----------------------------------------------------------------------- *
 *   
 *   Copyright 2000-2001 H. Peter Anvin - All Rights Reserved
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, Inc., 675 Mass Ave, Cambridge MA 02139,
 *   USA; either version 2 of the License, or (at your option) any later
 *   version; incorporated herein by reference.
 *
 * ----------------------------------------------------------------------- */

/*
 * objstore.h
 *
 * Public header file for the persistent object store
 */

#ifndef OBJSTORE_H
#define OBJSTORE_H

#include <stdlib.h>
#include <signal.h>
#include <inttypes.h>

/* Low-level core routines */

void *objstore_init(const char *, const char *, size_t *);
int objstore_checkpoint(double);
int objstore_extend(size_t);

/* Arena management routines */

/* The allocator gives us this many "root pointers" for our own use.  They
   are initialized to NULL when a new arena is created, and are intended
   to be used to find all the data structures.  objstore_arena_init()
   returns a pointer to this array (if successful). */
#define ROOT_DATA_POINTERS	32

void **objstore_arena_init(const char *, const char *);
void *objstore_malloc(size_t);
void objstore_free(void *);
void *objstore_realloc(void *, size_t);

void **objstore_get_root_ptrs(void);

#endif