[PATCH] D12669: [libcxxabi] Fix alignment of pointers returned by fallback_malloc

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 7 16:56:26 PDT 2015


EricWF added inline comments.

================
Comment at: src/fallback_malloc.ipp:69
@@ -59,1 +68,3 @@
+// Size: 4
+// Alignment: 2
 struct heap_node {
----------------
compnerd wrote:
> Make this a set of static_asserts?
I was going to but I wasn't 100% sure this would be true on all platforms. 

================
Comment at: src/fallback_malloc.ipp:104
@@ +103,3 @@
+
+bool is_fallback_ptr(void *ptr) {
+  return ptr >= heap && ptr < (heap + HeapSize);
----------------
compnerd wrote:
> Why the movement here?
Just trying to better group the functions. I wanted to put this closer to the definition of `heap` and `freelist`.


http://reviews.llvm.org/D12669





More information about the cfe-commits mailing list