compnerd added a comment.

While I think that ensuring that the fallback malloc path works properly is 
needed, AIUI, this is still insufficient, as there is a first attempt at using 
malloc, which doesn't have alignment guarantees (except on Darwin).  Also, a 
clang-format over the patch would be appreciated.


================
Comment at: src/fallback_malloc.ipp:25
@@ -15,1 +24,3 @@
+#error The required macro '_ALIGNAS_TYPE' is not defined.
+#endif
 
----------------
Ick, but I see why this is needed.  Might be nice to expand the comment about 
not being able to include headers with a why.

================
Comment at: src/fallback_malloc.ipp:69
@@ -59,1 +68,3 @@
+// Size: 4
+// Alignment: 2
 struct heap_node {
----------------
Make this a set of static_asserts?

================
Comment at: src/fallback_malloc.ipp:104
@@ +103,3 @@
+
+bool is_fallback_ptr(void *ptr) {
+  return ptr >= heap && ptr < (heap + HeapSize);
----------------
Why the movement here?


http://reviews.llvm.org/D12669



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to