Memory-Allocators
sanitizers
Memory-Allocators | sanitizers | |
---|---|---|
1 | 54 | |
23 | 11,405 | |
- | 1.0% | |
4.9 | 7.8 | |
about 1 year ago | about 1 month ago | |
C | C | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Memory-Allocators
-
Memory Allocators
Hey everyone! I recently created some memory allocators as a part of a mini-project. It's primarily made for educational purposes on this topic but if anyone is interested in using them and/or providing feedback here is a link to the repository. Thank you:)
sanitizers
-
Logging all C++ destructors, poor mans run-time tracing
ASAN also checks for memory leaks like valgrind, the main difference with the tools is whether you can recompile all of libraries to get the compiler support for detection or whether binary instrumentation is better (https://github.com/google/sanitizers/wiki/AddressSanitizerLe...)
-
Twenty Years of Valgrind
I like Valgrind, but day-to-day, I find myself typically reaching for Sanitizers[1] instead (ASan, et. al.), especially since they're built-in to many compilers these days, and are a bit faster IME.
Are there any use cases that people here have experienced where Valgrind is their first choice?
[1] https://github.com/google/sanitizers
-
Code Smell 260 - Crowdstrike NULL
Use address sanitizers
- The sad state of property-based testing libraries
-
Trip C++Now 2024 – think-cell
While shipping debug symbols is something I recommend and has no side-effects aside from mere file-size (debug symbols are only loaded when used).
[1] https://github.com/google/sanitizers/issues/857
-
Good resources for learning C in depth?
AddressSanitizer is really useful, it's similar to Valgrind but has much lower overhead.
-
Memory Allocators
And if you're up for it, I'd further recommend adding some ways to deal with buffer overflows in debug builds. The way I deal with this is by using Address-Sanitizer's manual poisoning api. Bonus point if you leave additional poisoned space between allocations so off by one errors are likely to end up in a poisoned region instead of nearby allocation.
- Exception thrown: write access violation
-
2023 Stack Overflow Survey: Rust is the most admired programming language, making it the most loved language for 8 years in a row
It also doesn't hurt that Miri can find many kinds of unsafe violations even in unsafe blocks. Zig may get something like this one day, but even if it does, checking things at runtime is not a substitute for compile time -- the C++ Sanitizers haven't exactly solved the safety story for C++ even over a decade later.
-
What's the best thing you've found in code? :
This is where stuff like ASan is really useful.
What are some alternatives?
memory-allocators - Custom memory allocators in C++ to improve the performance of dynamic memory allocation
miri - An interpreter for Rust's mid-level intermediate representation
allocator - Customisable, thread-safe C11 memory allocator based off the K&R "storage allocator"
spdlog - Fast C++ logging library.
c-allocators - A collection of public domain single-file custom allocators for C/C++
plotters - A rust drawing library for high quality data plotting for both WASM and native, statically and realtimely 🦀 📈🚀
Arenas - Unmanaged arena memory allocators for C#/CSharp with easy interactions between managed and unmanaged references
xeus-cling - Jupyter kernel for the C++ programming language
buddy_alloc - A single header buddy memory allocator for C & C++
Catch - A modern, C++-native, test framework for unit-tests, TDD and BDD - using C++14, C++17 and later (C++11 support is in v2.x branch, and C++03 on the Catch1.x branch)
util-linux
gui_starter_template - A template CMake project to get you started with C++ and tooling