Convert things from AOS logging to glog
This is necessary so ceres (which includes glog) can be included in more
places.
Change-Id: Ie0a54dc6a9e21e0c2f11899d08c87d08c5c0e028
diff --git a/aos/vision/blob/region_alloc.h b/aos/vision/blob/region_alloc.h
index 8c7bc57..df33fed 100644
--- a/aos/vision/blob/region_alloc.h
+++ b/aos/vision/blob/region_alloc.h
@@ -9,8 +9,6 @@
#include <utility>
#include <vector>
-#include "aos/logging/logging.h"
-
namespace aos {
namespace vision {
@@ -22,12 +20,12 @@
T *cons_obj(Args &&... args) {
uint8_t *ptr = NULL;
if (sizeof(T) + alignof(T) > block_size_) {
- LOG(FATAL, "allocating %d too much\n", (int)sizeof(T));
+ __builtin_trap();
}
while (ptr == NULL) {
if (next_free_ >= memory_.size()) {
if (next_free_ >= 1024) {
- LOG(FATAL, "too much alloc\n");
+ __builtin_trap();
}
memory_.emplace_back(new uint8_t[block_size_]);
} else if ((used_size_ % alignof(T)) != 0) {