Skip to content

Commit

Permalink
Reduce RSS when reloading the daemon
Browse files Browse the repository at this point in the history
Fixes #24
  • Loading branch information
hughsie committed Oct 25, 2023
1 parent dfa124a commit 59c73a8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/passim-server.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ passim_server_libdir_add(PassimServer *self, const gchar *filename, GError **err
if (!passim_item_load_filename(item, filename, error))
return FALSE;

/* not required now */
passim_item_set_bytes(item, NULL);

/* get optional attributes */
value = passim_xattr_get_uint32(filename, "user.max_age", 24 * 60 * 60, error);
if (value == G_MAXUINT32)
Expand Down Expand Up @@ -265,6 +268,9 @@ passim_server_sysconfpkgdir_add(PassimServer *self, const gchar *filename, GErro
if (!passim_item_load_filename(item, filename, error))
return FALSE;

/* not required now */
passim_item_set_bytes(item, NULL);

/* never delete these */
passim_item_set_max_age(item, G_MAXUINT32);
passim_item_set_share_limit(item, G_MAXUINT32);
Expand Down

0 comments on commit 59c73a8

Please sign in to comment.