Simplify memory manager

This commit is contained in:
Justine Tunney 2024-07-04 10:52:16 -07:00
parent 5a9a08d1cf
commit 01587de761
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
40 changed files with 451 additions and 311 deletions

View file

@ -1,5 +1,6 @@
#include "libc/sysv/consts/auxv.h"
#include "libc/runtime/runtime.h"
#include "libc/runtime/runtime.h"
/* ---------------------------- setting mparams -------------------------- */
@ -48,7 +49,7 @@ __attribute__((__constructor__(49))) int init_mparams(void) {
size_t gsize;
#if defined(__COSMOPOLITAN__)
psize = getauxval(AT_PAGESZ);
psize = getpagesize();
gsize = DEFAULT_GRANULARITY ? DEFAULT_GRANULARITY : psize;
#elif !defined(WIN32)
psize = malloc_getpagesize;