Skip to content

Commit

Permalink
g++ build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mjp41 committed Jun 11, 2024
1 parent 4a45ca6 commit 0f36585
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/test/func/miracle_ptr/miracle_ptr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ SNMALLOC_SLOW_PATH void error(std::string msg)
abort();
}

SNMALLOC_FAST_PATH void check(bool b, std::string msg)
SNMALLOC_FAST_PATH_INLINE void check(bool b, std::string msg)
{
if (SNMALLOC_UNLIKELY(!b))
error(msg);
Expand Down Expand Up @@ -114,12 +114,18 @@ void operator delete(void* p)
snmalloc::miracle::free(p);
}

void operator delete(void* p, size_t)
{
snmalloc::miracle::free(p);
}


/**
* This class can be used to replace a raw pointer. It will automatically use
* the underlying backup reference counting design from the miracle pointer
* docs.
*/
template<typename T>
template <typename T>
class raw_ptr
{
T* p;
Expand Down

0 comments on commit 0f36585

Please sign in to comment.