Skip to content

Commit c9d8d5d

Browse files
committed
README: Mention pool expansion
1 parent bff1f09 commit c9d8d5d

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

README.org

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,14 @@ described below:
4848
2. Allocate necessary chunks from the pool, and use them.
4949
3. When a chunk is no longer needed, free it so it can be used by subsequent
5050
allocations.
51-
4. When the pool itself is no longer needed, close it.
51+
4. Optionally expand the pool, if you run out of chunks.
52+
5. When the pool itself is no longer needed, close it.
5253

5354
For a full example, see [[file:src/main.c][src/main.c]].
5455

5556
* Functions
5657

57-
This library consists of only 4 functions:
58+
This library consists of only 5 functions:
5859

5960
- Function: =pool_new= ::
6061

@@ -69,6 +70,13 @@ This library consists of only 4 functions:
6970
Note that the =chunk_sz= argument must be greater or equal than
7071
=sizeof(void*)=. For more information, see the /Caveats/ section.
7172

73+
- Function: =pool_expand= ::
74+
75+
Expand the specified =pool=, adding =extra_chunk_num= free chunks.
76+
77+
On success, it returns /true/; otherwise, it returns /false/ and leaves the pool
78+
unchanged.
79+
7280
- Function: =pool_close= ::
7381

7482
Free all data in a =Pool= structure, along with the structure itself. After a

0 commit comments

Comments
 (0)