Optimize memory layout

This commit is contained in:
Justine Tunney 2022-09-12 04:19:32 -07:00
parent 0305194d98
commit b69f3d2488
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
41 changed files with 383 additions and 347 deletions

View file

@ -5,6 +5,9 @@
Use of this source code is governed by the BSD-style licenses that can
be found in the third_party/zlib/LICENSE file.
*/
#include "libc/intrin/kprintf.h"
#include "libc/intrin/weaken.h"
#include "libc/log/log.h"
#include "libc/mem/mem.h"
#include "third_party/zlib/zutil.internal.h"
@ -117,9 +120,10 @@ uLong zlibCompileFlags() {
#endif
int z_verbose hidden = verbose;
void z_error(char *m) {
fprintf(stderr, "%s\n", m);
exit(1);
void z_error(const char *file, int line, char *m) {
kprintf("%s:%d: zlib panic: %s\n", file, line, m);
if (weaken(__die)) weaken(__die)();
_Exit(1);
}
#endif