This commit is contained in:
pommicket 2022-02-23 22:37:01 -08:00
parent 9bc8a11afe
commit c75af0c8e5
28 changed files with 711 additions and 64 deletions

View file

@ -324,7 +324,7 @@ void *malloc(size_t n)
{
struct chunk *c;
int i, j;
if (n == 0) n = 1;/* everyone depends on this behavior for some fucking reason */
if (!n || adjust_size(&n) < 0) return 0;
if (n > MMAP_THRESHOLD) {