Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ocsmit/cslice
Interface for defining typed slices + arena memory allocator for C
https://github.com/ocsmit/cslice
Last synced: about 1 month ago
JSON representation
Interface for defining typed slices + arena memory allocator for C
- Host: GitHub
- URL: https://github.com/ocsmit/cslice
- Owner: ocsmit
- License: gpl-3.0
- Created: 2024-04-11T22:29:22.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-04-11T22:47:30.000Z (11 months ago)
- Last Synced: 2024-11-13T09:48:38.510Z (3 months ago)
- Language: C
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
see [test file](./src/test.c) for example usage which outputs below
```sh
$ make && ./bingcc -g -Wall -O0 -std=c11 -Wextra -Wwrite-strings -Wno-parentheses -Wpedantic -Warray-bounds -Wconversion -Wstrict-prototypes -Wnewline-eof -c -o src/arena.o src/arena.c
gcc -g -Wall -O0 -std=c11 -Wextra -Wwrite-strings -Wno-parentheses -Wpedantic -Warray-bounds -Wconversion -Wstrict-prototypes -Wnewline-eof -o bin src/arena.o src/slice.o src/test.o
testing stack i8
0 : 8
1 : 237
2 : 1
3 : 2
4 : 44
5 : 99
6 : 1
7 : 2
8 : 44
9 : -99
40, 40
40, 40
failed with error : LIMIT ERROR
pop
36, 40
push
40, 40
DONEtesting arena
arena cap: 80
arena offset: 40
stack cap: 40
0 : 8
1 : 237
2 : 1
3 : 2
4 : 44
5 : 99
6 : 1
7 : 2
8 : 44
9 : -99
40, 40
0 : 8
1 : 237
2 : 1
3 : 9999
4 : 44
5 : 99
6 : 1
7 : 2
8 : 44
9 : -99
```