Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
29d94001
Commit
29d94001
authored
Aug 13, 2019
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Never allocate at offset zero in a cluster, this makes it faster
for clients what the _index entry is about.
parent
ea995d69
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
common_vsmw.c
bin/varnishd/common/common_vsmw.c
+6
-1
No files found.
bin/varnishd/common/common_vsmw.c
View file @
29d94001
...
@@ -137,6 +137,9 @@ struct vsmw {
...
@@ -137,6 +137,9 @@ struct vsmw {
uint64_t
nsubs
;
uint64_t
nsubs
;
};
};
/* Allocations in clusters never start at offset zero */
#define VSM_CLUSTER_OFFSET 16
/*--------------------------------------------------------------------*/
/*--------------------------------------------------------------------*/
static
void
static
void
...
@@ -307,7 +310,9 @@ VSMW_NewCluster(struct vsmw *vsmw, size_t len, const char *pfx)
...
@@ -307,7 +310,9 @@ VSMW_NewCluster(struct vsmw *vsmw, size_t len, const char *pfx)
struct
vsmwseg
*
seg
;
struct
vsmwseg
*
seg
;
vsmw_do_lock
();
vsmw_do_lock
();
vc
=
vsmw_newcluster
(
vsmw
,
len
,
pfx
);
vc
=
vsmw_newcluster
(
vsmw
,
len
+
VSM_CLUSTER_OFFSET
,
pfx
);
AN
(
vc
);
vc
->
next
+=
VSM_CLUSTER_OFFSET
;
ALLOC_OBJ
(
seg
,
VSMWSEG_MAGIC
);
ALLOC_OBJ
(
seg
,
VSMWSEG_MAGIC
);
AN
(
seg
);
AN
(
seg
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment