Merge pull request #1180 from urbit/reclaim-often

reclaim memory every 1k events in live operation or replay
This commit is contained in:
ixv 2019-02-02 20:41:07 -08:00 committed by GitHub
commit 4146ce3400
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -2074,6 +2074,10 @@ u3_raft_chip(void)
u3z(rus);
}
if ( 0 == (u3A->ent_d % 1000ULL) ) {
u3m_reclaim();
}
}
/* u3_raft_play(): synchronously process events.

View File

@ -1090,6 +1090,10 @@ _sist_rest()
u3z(ven);
cur_d += c3_wiseof(len_w) + len_w + c3_wiseof(lar_u);
if ( 0 == (xno_w % 1000) ) {
u3m_reclaim();
}
}
fputc('\r', stderr);
fputc('\n', stderr);