Skip to content

Commit 3747b6f

Browse files
committed
Allow larger stack allocations
1 parent a388c4a commit 3747b6f

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

include/tiny_stack_allocator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include <stddef.h>
1010

1111
enum {
12-
tiny_stack_allocator_largest_supported_size = 256
12+
tiny_stack_allocator_largest_supported_size = 4096
1313
};
1414

1515
typedef void (*tiny_stack_allocator_callback_t)(void* context, void* data);

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"maintainer": true
1414
}
1515
],
16-
"version": "7.2.1",
16+
"version": "7.3.0",
1717
"frameworks": "*",
1818
"platforms": "*",
1919
"export": {

src/tiny_stack_allocator.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ define_worker(32);
4242
define_worker(64);
4343
define_worker(128);
4444
define_worker(256);
45+
define_worker(512);
46+
define_worker(1024);
47+
define_worker(2048);
48+
define_worker(4096);
4549

4650
typedef struct {
4751
size_t size;
@@ -55,6 +59,10 @@ static const worker_t workers[] = {
5559
{ 64, worker_64 },
5660
{ 128, worker_128 },
5761
{ 256, worker_256 },
62+
{ 512, worker_512 },
63+
{ 1024, worker_1024 },
64+
{ 2048, worker_2048 },
65+
{ 4096, worker_4096 },
5866
};
5967

6068
void tiny_stack_allocator_allocate_aligned(

0 commit comments

Comments
 (0)