File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -48,13 +48,14 @@ described below:
48482. Allocate necessary chunks from the pool, and use them.
49493. 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
5354For 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
You can’t perform that action at this time.
0 commit comments