mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +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
|
@ -33,7 +33,6 @@ static uint64_t __zipos_fnv(const char *s, int len) {
|
|||
|
||||
uint64_t __zipos_inode(struct Zipos *zipos, int64_t cfile, //
|
||||
const void *name, size_t namelen) {
|
||||
unassert(cfile >= 0);
|
||||
if (cfile == ZIPOS_SYNTHETIC_DIRECTORY) {
|
||||
if (namelen && ((char *)name)[namelen - 1] == '/') --namelen;
|
||||
cfile = INT64_MIN | __zipos_fnv(name, namelen);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue