mirror of
https://github.com/ckolivas/lrzip.git
synced 2026-04-04 22:07:42 +00:00
Reinstitute 2GB window limit on 32 bit. It still doesn't work. However we can now decompress larger windows.
Do more mmap in place of malloc. Update docs. Remove redundant code.
This commit is contained in:
parent
0e09c9ec24
commit
772fbf602e
4 changed files with 25 additions and 24 deletions
11
stream.c
11
stream.c
|
|
@ -645,7 +645,7 @@ void *open_stream_out(int f, int n, i64 limit)
|
|||
for (i = 0; i < n; i++) {
|
||||
sinfo->s[i].buf = malloc(sinfo->bufsize);
|
||||
if (!sinfo->s[i].buf)
|
||||
goto failed;
|
||||
fatal("Unable to malloc buffer of size %lld in open_stream_out\n", sinfo->bufsize);
|
||||
}
|
||||
|
||||
/* write the initial headers */
|
||||
|
|
@ -658,15 +658,6 @@ void *open_stream_out(int f, int n, i64 limit)
|
|||
sinfo->cur_pos += 25;
|
||||
}
|
||||
return (void *)sinfo;
|
||||
|
||||
failed:
|
||||
for (i = 0; i < n; i++) {
|
||||
if (sinfo->s[i].buf)
|
||||
free(sinfo->s[i].buf);
|
||||
}
|
||||
|
||||
free(sinfo);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* prepare a set of n streams for reading on file descriptor f */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue