summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/content.c5
-rw-r--r--content/content.h1
2 files changed, 4 insertions, 2 deletions
diff --git a/content/content.c b/content/content.c
index e4431453a..63b7f7b26 100644
--- a/content/content.c
+++ b/content/content.c
@@ -873,14 +873,15 @@ void content_clean(void)
next = 0;
for (c = content_list; c; c = c->next) {
next = c;
- size += c->size + talloc_total_size(c);
+ c->talloc_size = talloc_total_size(c);
+ size += c->size + c->talloc_size;
}
for (c = next; c && (unsigned int) option_memory_cache_size < size;
c = prev) {
prev = c->prev;
if (c->user_list->next)
continue;
- size -= c->size + talloc_total_size(c);
+ size -= c->size + c->talloc_size;
content_destroy(c);
}
}
diff --git a/content/content.h b/content/content.h
index ae43b933e..a44d36782 100644
--- a/content/content.h
+++ b/content/content.h
@@ -232,6 +232,7 @@ struct content {
unsigned int size; /**< Estimated size of all data
associated with this content, except
alloced as talloc children of this. */
+ off_t talloc_size; /**< Used by content_clean() */
char *title; /**< Title for browser window. */
unsigned int active; /**< Number of child fetches or
conversions currently in progress. */