mirror of
https://github.com/ostreedev/ostree.git
synced 2025-01-27 18:04:17 +03:00
delta: Unreference files we've processed
This should help avoid address space exhaustion on 32 bit systems, and in general is obviously going to improve efficiency. Closes: #498 Approved by: alexlarsson
This commit is contained in:
parent
e127070550
commit
23b4b58d57
@ -429,8 +429,8 @@ content_rollsums_free (ContentRollsum *rollsum)
|
||||
{
|
||||
g_free (rollsum->from_checksum);
|
||||
_ostree_rollsum_matches_free (rollsum->matches);
|
||||
g_bytes_unref (rollsum->tmp_from);
|
||||
g_bytes_unref (rollsum->tmp_to);
|
||||
g_clear_pointer (&rollsum->tmp_from, g_bytes_unref);
|
||||
g_clear_pointer (&rollsum->tmp_to, g_bytes_unref);
|
||||
g_free (rollsum);
|
||||
}
|
||||
|
||||
@ -438,8 +438,8 @@ static void
|
||||
content_bsdiffs_free (ContentBsdiff *bsdiff)
|
||||
{
|
||||
g_free (bsdiff->from_checksum);
|
||||
g_bytes_unref (bsdiff->tmp_from);
|
||||
g_bytes_unref (bsdiff->tmp_to);
|
||||
g_clear_pointer (&bsdiff->tmp_from, g_bytes_unref);
|
||||
g_clear_pointer (&bsdiff->tmp_to, g_bytes_unref);
|
||||
g_free (bsdiff);
|
||||
}
|
||||
|
||||
@ -758,6 +758,9 @@ process_one_rollsum (OstreeRepo *repo,
|
||||
g_string_append_c (current_part->operations, (gchar)OSTREE_STATIC_DELTA_OP_CLOSE);
|
||||
}
|
||||
|
||||
g_clear_pointer (&rollsum->tmp_from, g_bytes_unref);
|
||||
g_clear_pointer (&rollsum->tmp_to, g_bytes_unref);
|
||||
|
||||
ret = TRUE;
|
||||
out:
|
||||
return ret;
|
||||
@ -854,6 +857,9 @@ process_one_bsdiff (OstreeRepo *repo,
|
||||
|
||||
g_string_append_c (current_part->operations, (gchar)OSTREE_STATIC_DELTA_OP_UNSET_READ_SOURCE);
|
||||
|
||||
g_clear_pointer (&bsdiff_content->tmp_from, g_bytes_unref);
|
||||
g_clear_pointer (&bsdiff_content->tmp_to, g_bytes_unref);
|
||||
|
||||
ret = TRUE;
|
||||
out:
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user