mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-16 10:49:26 +03:00
adds u3m_reclaim to clear persistent caches in vere
This commit is contained in:
parent
1087de003f
commit
ffdc465085
@ -125,3 +125,8 @@
|
||||
*/
|
||||
void
|
||||
u3m_wall(u3_noun wol);
|
||||
|
||||
/* u3m_reclaim: clear persistent caches to reclaim memory
|
||||
*/
|
||||
void
|
||||
u3m_reclaim(void);
|
||||
|
@ -1723,3 +1723,33 @@ u3m_boot(c3_o nuu_o, c3_o bug_o, c3_c* dir_c,
|
||||
u3n_ream();
|
||||
}
|
||||
}
|
||||
|
||||
/* u3m_reclaim: clear persistent caches to reclaim memory
|
||||
*/
|
||||
void
|
||||
u3m_reclaim(void)
|
||||
{
|
||||
// clear the memoization cache
|
||||
//
|
||||
u3h_free(u3R->cax.har_p);
|
||||
u3R->cax.har_p = u3h_new();
|
||||
|
||||
// clear the bytecode cache
|
||||
//
|
||||
u3h_free(u3R->byc.har_p);
|
||||
u3R->byc.har_p = u3h_new();
|
||||
|
||||
// clear the jet battery hash cache
|
||||
//
|
||||
u3h_free(u3R->jed.bas_p);
|
||||
u3R->jed.bas_p = u3h_new();
|
||||
|
||||
// clear the jet hank cache
|
||||
//
|
||||
u3h_free(u3R->jed.han_p);
|
||||
u3R->jed.han_p = u3h_new();
|
||||
|
||||
// clear the u3v_wish cache
|
||||
u3z(u3A->yot);
|
||||
u3A->yot = u3_nul;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user