mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-06 11:18:30 +00:00
Improve documentation
The Cosmo API documentation page is pretty good now https://justine.lol/cosmopolitan/documentation.html
This commit is contained in:
parent
13437dd19b
commit
1bc3a25505
367 changed files with 2542 additions and 26178 deletions
|
@ -22,6 +22,16 @@
|
|||
#include "libc/sysv/consts/map.h"
|
||||
#include "libc/sysv/consts/prot.h"
|
||||
|
||||
/**
|
||||
* Helper function for allocating anonymous mapping.
|
||||
*
|
||||
* This function is equivalent to:
|
||||
*
|
||||
* mmap(NULL, mapsize, PROT_READ | PROT_WRITE,
|
||||
* MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
|
||||
*
|
||||
* Except it offers a small saving on code size.
|
||||
*/
|
||||
void *mapanon(size_t mapsize) {
|
||||
return mmap(NULL, mapsize, PROT_READ | PROT_WRITE,
|
||||
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue