Fix some zipos directory related bugs

This commit is contained in:
Justine Tunney 2023-09-18 22:17:56 -07:00
parent ec480f5aa0
commit ececec4c94
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
8 changed files with 114 additions and 30 deletions

View file

@ -62,8 +62,7 @@ static void __zipos_dismiss(uint8_t *map, const uint8_t *cdir, long pg) {
mo = ROUNDDOWN(lo, FRAMESIZE);
if (mo) munmap(map, mo);
// this is supposed to reduce our rss usage but does it
pg = getauxval(AT_PAGESZ);
// this is supposed to reduce our rss usage but does it really?
lo = ROUNDDOWN(lo, pg);
hi = MIN(ROUNDUP(hi, pg), ROUNDDOWN(c, pg));
if (hi > lo) {