diff options
| author | Jon Morton <jonanin@gmail.com> | 2012-04-01 21:14:16 -0500 |
|---|---|---|
| committer | Jon Morton <jonanin@gmail.com> | 2012-04-01 21:14:16 -0500 |
| commit | 413994ea3eed976a6fe97f3d6cfeb0c2f453e77f (patch) | |
| tree | 653313277b5712ea63d7e381ae74397f62f435bb /src/rt/memory_region.cpp | |
| parent | 9ec21933f1b730862f85c4dc6a4e46359e84a865 (diff) | |
| download | rust-413994ea3eed976a6fe97f3d6cfeb0c2f453e77f.tar.gz rust-413994ea3eed976a6fe97f3d6cfeb0c2f453e77f.zip | |
replace assertion macros with plain asserts
Diffstat (limited to 'src/rt/memory_region.cpp')
| -rw-r--r-- | src/rt/memory_region.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rt/memory_region.cpp b/src/rt/memory_region.cpp index 770691e88ea..baa6e9ed369 100644 --- a/src/rt/memory_region.cpp +++ b/src/rt/memory_region.cpp @@ -55,7 +55,7 @@ void memory_region::free(void *mem) { # endif if (_live_allocations < 1) { - _srv->fatal("live_allocs < 1", __FILE__, __LINE__, ""); + assert(false && "live_allocs < 1"); } release_alloc(mem); maybe_poison(mem); @@ -88,7 +88,7 @@ memory_region::realloc(void *mem, size_t orig_size) { alloc->index, _allocation_list[alloc->index], alloc); printf("realloc: ptr 0x%" PRIxPTR " (%s) is not in allocation_list\n", (uintptr_t) get_data(alloc), alloc->tag); - _srv->fatal("not in allocation_list", __FILE__, __LINE__, ""); + assert(false && "not in allocation_list"); } else { _allocation_list[newMem->index] = newMem; @@ -166,8 +166,8 @@ memory_region::~memory_region() { # endif if (_live_allocations > 0) { - _srv->fatal(msg, __FILE__, __LINE__, - "%d objects", _live_allocations); + fprintf(stderr, "%s\n", msg); + assert(false); } if (_synchronized) { _lock.unlock(); } } @@ -184,7 +184,7 @@ memory_region::release_alloc(void *mem) { if (_allocation_list[alloc->index] != alloc) { printf("free: ptr 0x%" PRIxPTR " (%s) is not in allocation_list\n", (uintptr_t) get_data(alloc), alloc->tag); - _srv->fatal("not in allocation_list", __FILE__, __LINE__, ""); + assert(false && "not in allocation_list"); } else { // printf("freed index %d\n", index); |
