Commit d45b49f4 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add a stevedore for synthetic pages.

The storage from this stevedore is backed by an autoextending vsb, which
can be used to generate synthetic pages into.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@3025 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent a53a333e
......@@ -51,6 +51,7 @@ varnishd_SOURCES = \
stevedore.c \
storage_file.c \
storage_malloc.c \
storage_synth.c \
tcp.c \
varnishd.c
......
......@@ -121,6 +121,7 @@ child_main(void)
VCA_Init();
SMS_Init();
STV_open();
VSL_stats->start_time = (time_t)TIM_real();
......
......@@ -83,7 +83,7 @@ STV_trim(const struct storage *st, size_t size)
}
void
STV_free(const struct storage *st)
STV_free(struct storage *st)
{
CHECK_OBJ_NOTNULL(st, STORAGE_MAGIC);
......
......@@ -39,7 +39,7 @@ typedef void storage_init_f(struct stevedore *, int ac, char * const *av);
typedef void storage_open_f(const struct stevedore *);
typedef struct storage *storage_alloc_f(struct stevedore *, size_t size);
typedef void storage_trim_f(const struct storage *, size_t size);
typedef void storage_free_f(const struct storage *);
typedef void storage_free_f(struct storage *);
struct stevedore {
unsigned magic;
......@@ -59,6 +59,9 @@ struct stevedore {
struct storage *STV_alloc(struct sess *sp, size_t size);
void STV_trim(const struct storage *st, size_t size);
void STV_free(const struct storage *st);
void STV_free(struct storage *st);
void STV_add(const struct stevedore *stv, int ac, char * const *av);
void STV_open(void);
/* Synthetic Storage */
void SMS_Init(void);
......@@ -681,7 +681,7 @@ smf_trim(const struct storage *s, size_t size)
/*--------------------------------------------------------------------*/
static void
smf_free(const struct storage *s)
smf_free(struct storage *s)
{
struct smf *smf;
struct smf_sc *sc;
......
......@@ -86,7 +86,7 @@ sma_alloc(struct stevedore *st, size_t size)
}
static void
sma_free(const struct storage *s)
sma_free(struct storage *s)
{
struct sma *sma;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment