summaryrefslogtreecommitdiffstats
path: root/contrib/restricted/aws/aws-c-common/source/allocator_sba.c
diff options
context:
space:
mode:
authorrobot-contrib <[email protected]>2023-01-18 12:47:30 +0300
committerrobot-contrib <[email protected]>2023-01-18 12:47:30 +0300
commit564b9209fbcb0a6d11aaa91ccb111b7302b73c42 (patch)
tree38ce66bc912000b3855c09f07c7a00f9d5f6303a /contrib/restricted/aws/aws-c-common/source/allocator_sba.c
parentf23d6eff014dc53e1bc818d359d9afd11ba919c0 (diff)
Update contrib/restricted/aws/aws-c-common to 0.8.6
Diffstat (limited to 'contrib/restricted/aws/aws-c-common/source/allocator_sba.c')
-rw-r--r--contrib/restricted/aws/aws-c-common/source/allocator_sba.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/restricted/aws/aws-c-common/source/allocator_sba.c b/contrib/restricted/aws/aws-c-common/source/allocator_sba.c
index 47f080acade..4ebd6551f18 100644
--- a/contrib/restricted/aws/aws-c-common/source/allocator_sba.c
+++ b/contrib/restricted/aws/aws-c-common/source/allocator_sba.c
@@ -289,6 +289,11 @@ size_t aws_small_block_allocator_page_size(struct aws_allocator *sba_allocator)
return AWS_SBA_PAGE_SIZE;
}
+size_t aws_small_block_allocator_page_size_available(struct aws_allocator *sba_allocator) {
+ (void)sba_allocator;
+ return AWS_SBA_PAGE_SIZE - sizeof(struct page_header);
+}
+
/* NOTE: Expects the mutex to be held by the caller */
static void *s_sba_alloc_from_bin(struct sba_bin *bin) {
/* check the free list, hand chunks out in FIFO order */