diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-08-02 01:29:15 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-08-02 01:29:15 +0100 |
| commit | 678f457a9797ae064634f8ba2a83b156f2892871 (patch) | |
| tree | 31e5d6625e16dd5842022e5d99de4dd51ea55277 /dev/lib/memory | |
| parent | 4dbb5cc1283eed26cb9b66600fe9bb594aad8ef3 (diff) | |
refactor! breaking API changes of SOCL, also reworked must_pass helpers, and added one for the fix parser.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/lib/memory')
| -rw-r--r-- | dev/lib/memory/tracked_ptr.hpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/dev/lib/memory/tracked_ptr.hpp b/dev/lib/memory/tracked_ptr.hpp index 1ff4cca..61ad685 100644 --- a/dev/lib/memory/tracked_ptr.hpp +++ b/dev/lib/memory/tracked_ptr.hpp @@ -12,6 +12,10 @@ #include <memory> #include <atomic> +#include <sys/types.h> +#include <unistd.h> +#include <signal.h> + namespace snu::memory { template <typename T> @@ -211,6 +215,9 @@ namespace snu::memory template <typename T> inline void must_pass(tracked_ptr<T>& ptr) noexcept { - assert(ptr.manager().allocator().allocated_count_ < ptr.manager().allocator().deallocated_count_); + if (ptr.manager().allocator().allocated_count_ < ptr.manager().allocator().deallocated_count_) + { + ::kill(::getpid(), SIGTRAP); + } } } // namespace snu::memory
\ No newline at end of file |
