mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 08:12:28 +00:00
Optimize memory layout
This commit is contained in:
parent
0305194d98
commit
b69f3d2488
41 changed files with 383 additions and 347 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue