From 97d5c458cfa039d857301e1ca7d5af3beb37131d Mon Sep 17 00:00:00 2001 From: Jacob McDonnell Date: Sun, 26 Apr 2026 16:38:00 -0400 Subject: build: Better Build System --- static/v10/man3/malloc.3 | 94 ------------------------------------------------ 1 file changed, 94 deletions(-) delete mode 100644 static/v10/man3/malloc.3 (limited to 'static/v10/man3/malloc.3') diff --git a/static/v10/man3/malloc.3 b/static/v10/man3/malloc.3 deleted file mode 100644 index 2b241b30..00000000 --- a/static/v10/man3/malloc.3 +++ /dev/null @@ -1,94 +0,0 @@ -.TH MALLOC 3 -.CT 2 mem_man -.SH NAME -malloc, free, realloc, calloc, cfree \- memory allocator -.SH SYNOPSIS -.nf -.B char *malloc(size) -.B unsigned size; -.PP -.B free(ptr) -.B char *ptr; -.PP -.B char *realloc(ptr, size) -.B char *ptr; -.B unsigned size; -.PP -.B char *calloc(nelem, elsize) -.B unsigned nelem, elsize; -.PP -.B cfree(ptr) -.B char *ptr; -.fi -.SH DESCRIPTION -.I Malloc -and -.I free -provide a simple memory allocation package. -.I Malloc -returns a pointer to a new block of at least -.I size -bytes. -The block is suitably aligned for storage of any type of object. -No two active pointers from -.I malloc -will have the same value. -.PP -The argument to -.I free -is a pointer to a block previously allocated by -.IR malloc ; -this space is made available for further allocation. -.PP -.I Realloc -changes the size of the block pointed to by -.I ptr -to -.I size -bytes and returns a pointer to the (possibly moved) -block. -The contents will be unchanged up to the -lesser of the new and old sizes. -The call -.B "realloc((char*)0, size) -means the same as -.LR malloc(size) . -.PP -.I Calloc -allocates space for -an array of -.I nelem -elements of size -.I elsize. -The space is initialized to zeros. -.I Cfree -frees such a block. -.SH SEE ALSO -.IR galloc (3), -.IR brk (2), -.IR pool (3), -.IR block (3) -.SH DIAGNOSTICS -.I Malloc, realloc -and -.I calloc -return 0 if there is no available memory -or if the arena has been detectably corrupted. -.SH BUGS -When -.I realloc -returns 0, the block pointed to by -.I ptr -may have been destroyed. -.PP -User errors can corrupt the storage arena. -The most common gaffes are (1) freeing an already freed block, -(2) storing beyond the bounds of an allocated block, and (3) -freeing data that was not obtained from the allocator. -To help find such errors, a diagnosing allocator -may be loaded; use flag -.B -ldmalloc -of -.IR cc (1). -An even more stringently checking version may be created -by recompilation; see the source. -- cgit v1.2.3