]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/man/2/pool
vt: implement proper selections (thanks Ori_B)
[plan9front.git] / sys / man / 2 / pool
index 12a0a02ea6e437d382b67f5088411883763dad43..b637e3d7caf5819d0daeb903c2e3a1685efb97a9 100644 (file)
@@ -1,6 +1,6 @@
 .TH POOL 2
 .SH NAME
-poolalloc, poolallocalign, poolfree, poolmsize, poolrealloc, poolcompact, poolcheck, poolblockcheck,
+poolalloc, poolallocalign, poolfree, poolmsize, poolisoverlap, poolrealloc, poolcompact, poolcheck, poolblockcheck,
 pooldump \- general memory management routines
 .SH SYNOPSIS
 .B #include <u.h>
@@ -25,6 +25,9 @@ void  poolfree(Pool* pool, void* ptr)
 ulong  poolmsize(Pool* pool, void* ptr)
 .PP
 .B
+int    poolisoverlap(Pool* pool, void* ptr, ulong len)
+.PP
+.B
 void*  poolrealloc(Pool* pool, void* ptr, ulong size)
 .PP
 .B
@@ -109,6 +112,13 @@ that would usually go unused.
 .IR Poolmsize
 grows the block to encompass this extra space and returns the new size.
 .PP
+.I Poolisoverlap
+checks if the byte span
+.BR [ptr , ptr + len)
+overlaps the arenas of the specified
+.BR pool ,
+returning non-zero when there is overlap or zero if none.
+.PP
 The 
 .I poolblockcheck
 and
@@ -165,7 +175,7 @@ enum {  /* flags */
 };
 .EE
 .PP
-The pool obtains arenas of memory to manage by calling the the given
+The pool obtains arenas of memory to manage by calling the given
 .B alloc
 routine.
 The total number of requested bytes will not exceed