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

Move free indication to class field.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4850 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent f1955bc2
......@@ -80,7 +80,7 @@ mgt_SHM_Alloc(unsigned size, const char *class, const char *type, const char *id
while (1) {
CHECK_OBJ_NOTNULL(sha, SHMALLOC_MAGIC);
if (strcmp(sha->type, "Free")) {
if (strcmp(sha->class, "Free")) {
sha = SHA_NEXT(sha);
continue;
}
......@@ -95,7 +95,7 @@ mgt_SHM_Alloc(unsigned size, const char *class, const char *type, const char *id
memset(sha2, 0, sizeof *sha2);
sha2->magic = SHMALLOC_MAGIC;
sha2->len = sha->len - size;
bprintf(sha2->type, "%s", "Free");
bprintf(sha2->class, "%s", "Free");
MEMORY_BARRIER();
sha->len = size;
......@@ -298,7 +298,7 @@ mgt_SHM_Init(const char *fn, const char *l_arg)
loghead->head.magic = SHMALLOC_MAGIC;
loghead->head.len =
(uint8_t*)(loghead) + size - (uint8_t*)&loghead->head;
bprintf(loghead->head.type, "%s", "Free");
bprintf(loghead->head.class, "%s", "Free");
MEMORY_BARRIER();
VSL_stats = mgt_SHM_Alloc(sizeof *VSL_stats, VSL_CLASS_STAT, "", "");
......
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