mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-07 03:38:31 +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
|
@ -20,24 +20,19 @@
|
|||
#include "libc/mem/mem.h"
|
||||
#include "libc/runtime/buffer.h"
|
||||
|
||||
/* TODO(jart): Delete */
|
||||
|
||||
#define kGuard PAGESIZE
|
||||
#define kGrain FRAMESIZE
|
||||
|
||||
/**
|
||||
* Allocates page-guarded buffer.
|
||||
*
|
||||
* ┌─────────────────────────────────────┬s─i─g─s─e─g─v┐
|
||||
* │ 𝑣₀..𝑣ₙ₋₁ │𝑣ₙ..𝑣ₙ₊₄₀₉₆₋₁│
|
||||
* └─────────────────────────────────────┴s─i─g─s─e─g─v┘
|
||||
*
|
||||
* @param b is metadata object owned by caller, initialized to zero for
|
||||
* first call; subsequent calls will resize
|
||||
* @param a is alignment requirement in bytes, e.g. 1,2,4,8,16,...
|
||||
* @param n is buffer size in bytes
|
||||
* @return b->p
|
||||
* @see ralloc()
|
||||
* @deprecated
|
||||
*/
|
||||
void *balloc(struct GuardedBuffer *b, unsigned a, size_t n) {
|
||||
return (b->p = memalign(a, n));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue