This repository contains various data structures supported by a no heap C containers. This library is largely experimental as a byproduct of working with the pintOS
operating system at Stanford University, but perhaps it can be interesting to others.
- Read the Priority Queue Interface
- Read the Double Ended Priority Queue Interface
- Read the Set Interface
This repository is currently based around GCC, but it may compile with clang toolchains. Here is a starter CMakeUserPresets.json
file to get you started if your compiler preferences are different than the default.
Using the convenience makefile.
make rel
# run tests
make test-rel
# run one of the sample programs
./build/rel/graph -v=19
# update after edits
make
Replace rel
with deb
to build in debug mode.
Using the default CMake tools.
cmake --preset=rel
# update after edits
cmake -S . -B build/
{
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 21,
"patch": 0
},
"configurePresets": [
{
"name": "deb",
"displayName": "GMake GCC Debug",
"description": "Generated by Make with GCC base debug preset.",
"generator": "Unix Makefiles",
"inherits": [
"gcc-deb"
],
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"CMAKE_C_STANDARD": "11",
"CMAKE_C_COMPILER": "gcc-13",
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_RUNTIME_OUTPUT_DIRECTORY": "${sourceDir}/build/deb",
"CMAKE_C_FLAGS": "-g3 -Wall -Werror -Wextra -Wfloat-equal -Wtype-limits -Wpointer-arith -Wshadow -Winit-self -fno-diagnostics-show-option -Wno-nonnull-compare -Wno-pointer-bool-conversion"
}
},
{
"name": "rel",
"displayName": "GMake GCC Release",
"description": "Generated by Make with GCC base release preset.",
"generator": "Unix Makefiles",
"inherits": [
"gcc-rel"
],
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"CMAKE_C_STANDARD": "11",
"CMAKE_C_COMPILER": "gcc-13",
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_RUNTIME_OUTPUT_DIRECTORY": "${sourceDir}/build/rel",
"CMAKE_C_FLAGS": "-Wall -Werror -Wextra -Wfloat-equal -Wtype-limits -Wpointer-arith -Wshadow -Winit-self -fno-diagnostics-show-option -Wno-nonnull-compare -Wno-pointer-bool-conversion"
}
}
]
}