aboutsummaryrefslogtreecommitdiff
path: root/man/man3/venti-mem.3
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-07-12 15:24:18 +0000
committerrsc <devnull@localhost>2005-07-12 15:24:18 +0000
commitbe7cbb4ef2cb02aa9ac48c02dc1ee585a8e49043 (patch)
treebf1d493c17a924df86dd05099caf4c07bc11c0d7 /man/man3/venti-mem.3
parenta0d146edd7a7de6236a0d60baafeeb59f8452aae (diff)
downloadplan9port-be7cbb4ef2cb02aa9ac48c02dc1ee585a8e49043.tar.gz
plan9port-be7cbb4ef2cb02aa9ac48c02dc1ee585a8e49043.tar.bz2
plan9port-be7cbb4ef2cb02aa9ac48c02dc1ee585a8e49043.zip
venti, now with documentation!
Diffstat (limited to 'man/man3/venti-mem.3')
-rw-r--r--man/man3/venti-mem.367
1 files changed, 67 insertions, 0 deletions
diff --git a/man/man3/venti-mem.3 b/man/man3/venti-mem.3
new file mode 100644
index 00000000..46b2bb31
--- /dev/null
+++ b/man/man3/venti-mem.3
@@ -0,0 +1,67 @@
+.TH VENTI-MEM 3
+.SH NAME
+vtbrk,
+vtmalloc,
+vtmallocz,
+vtrealloc,
+vtstrdup,
+vtfree \- error-checking memory allocators
+.SH SYNOPSIS
+.ft L
+#include <u.h>
+.br
+#include <libc.h>
+.br
+#include <venti.h>
+.ta +\w'\fLvoid* 'u
+.PP
+.B
+void* vtbrk(int size)
+.PP
+.B
+void* vtmalloc(int size)
+.PP
+.B
+void* vtmallocz(int size)
+.PP
+.B
+void* vtrealloc(void *ptr, int size)
+.PP
+.B
+char* vtstrdup(char *s)
+.PP
+.B
+void vtfree(void *ptr)
+.SH DESCRIPTION
+These routines allocate and free memory.
+On failure, they print an error message and call
+.IR sysfatal (3).
+They do not return.
+.PP
+.I Vtbrk
+returns a pointer to a new block of at least
+.I size
+bytes.
+The block cannot be freed.
+.PP
+.IR Vtmalloc ,
+.IR vtrealloc ,
+and
+.I vtstrdup
+are like
+.IR malloc ,
+.IR realloc ,
+and
+.IR strdup ,
+but, as noted above, do not return on error.
+.I Vtmallocz
+is like
+.I vtmalloc
+but zeros the block before returning it.
+Memory allocated with all four should be freed with
+.I vtfree
+when no longer needed.
+.SH SOURCE
+.B \*9/src/libventi
+.SH SEE ALSO
+.IR venti (3)