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

@ -19,7 +19,9 @@
#include "libc/mem/mem.h"
/**
* Equivalent to memalign(PAGESIZE, n).
* Allocates granular aligned memory, i.e.
*
* memalign(sysconf(_SC_PAGESIZE), n);
*
* @param n number of bytes needed
* @return memory address, or NULL w/ errno
@ -27,5 +29,5 @@
* @threadsafe
*/
void *valloc(size_t n) {
return memalign(PAGESIZE, n);
return memalign(FRAMESIZE, n);
}