Assert not going through the PAL (#140)
* Assert not going through the PAL * Make it more difficult to assert() accidentally
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
#include "../pal/pal_consts.h"
|
||||
#include "bits.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
|
||||
namespace snmalloc
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
#include "defines.h"
|
||||
|
||||
#include <atomic>
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <type_traits>
|
||||
#if defined(_WIN32) && defined(__GNUC__)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <type_traits>
|
||||
|
||||
|
||||
@@ -1283,7 +1283,7 @@ namespace snmalloc
|
||||
SNMALLOC_SLOW_PATH void
|
||||
remote_dealloc_slow(RemoteAllocator* target, void* p, sizeclass_t sizeclass)
|
||||
{
|
||||
assert(target->id() != id());
|
||||
SNMALLOC_ASSERT(target->id() != id());
|
||||
|
||||
// Now that we've established that we're in the slow path (if we're a
|
||||
// real allocator, we will have to empty our cache now), check if we are
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
#include <iostream>
|
||||
#include <snmalloc.h>
|
||||
|
||||
#ifdef assert
|
||||
# undef assert
|
||||
#endif
|
||||
#define assert please_use_SNMALLOC_ASSERT
|
||||
|
||||
void* oe_base;
|
||||
void* oe_end;
|
||||
extern "C" const void* __oe_get_heap_base()
|
||||
|
||||
Reference in New Issue
Block a user