mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-10-07 06:57:20 +00:00
Rewrite ZipOS
This reduces the virtual memory usage of Emacs for me by 30%. We now have a simpler implementation that uses read(), rather mmap()ing the whole executable.
This commit is contained in:
parent
ff77f2a6af
commit
b01282e23e
21 changed files with 408 additions and 421 deletions
|
@ -39,14 +39,14 @@ int __zipos_access(struct ZiposUri *name, int amode) {
|
|||
return enoexec();
|
||||
}
|
||||
|
||||
ssize_t cf;
|
||||
int cf;
|
||||
if ((cf = __zipos_find(z, name)) == -1) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
int mode;
|
||||
if (cf != ZIPOS_SYNTHETIC_DIRECTORY) {
|
||||
mode = GetZipCfileMode(z->map + cf);
|
||||
mode = GetZipCfileMode(z->cdir + cf);
|
||||
} else {
|
||||
mode = S_IFDIR | 0555;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue