labath added a comment. I don't know much about IRMemoryMap myself, but this does seem uncontroversial. Nonetheless, I did manage to find something to rip into. :D
================ Comment at: source/Expression/IRMemoryMap.cpp:312-316 + // Round up the requested size to an aligned value, if needed. + if (size & alignment_mask) + allocation_size = ((size + alignment) & (~alignment_mask)); + else + allocation_size = size; ---------------- `allocation_size = llvm::alignTo(size, alignment)` ================ Comment at: source/Expression/IRMemoryMap.cpp:324-325 + // reduce internal fragmentation. + if (alignment > 1) + allocation_size += alignment; + } ---------------- I think this should be just `allocation_size += alignment -1`. The subsequent realignment cannot eat more than `alignment-1` bytes. https://reviews.llvm.org/D47551 _______________________________________________ lldb-commits mailing list [email protected] http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
