Adar Dembo has posted comments on this change. Change subject: arena: fix alignment of NewObject<> results, use variadic template ......................................................................
Patch Set 1: (3 comments) http://gerrit.cloudera.org:8080/#/c/6492/1//COMMIT_MSG Commit Message: PS1, Line 12: This fixes spurious leak warnings if the : leak checker is run while there is a live object allocated from an : arena which has pointers pointing out it. I presume this is how you noticed this in the first place, but what was the larger context? From a flaky test, perhaps? http://gerrit.cloudera.org:8080/#/c/6492/1/src/kudu/util/memory/arena-test.cc File src/kudu/util/memory/arena-test.cc: Line 109: a.AllocateBytes(1); Why is it important to allocate one byte first? Is it because otherwise the first allocation out of the arena will naturally be aligned? Either way, could you explain in a comment? http://gerrit.cloudera.org:8080/#/c/6492/1/src/kudu/util/memory/arena.h File src/kudu/util/memory/arena.h: Line 470: void *mem = AllocateBytesAligned(sizeof(T), alignof(T)); Any idea why this wasn't aligned in the first place? This is pretty old code, right? -- To view, visit http://gerrit.cloudera.org:8080/6492 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idad12bee02eebf58bf8d545812a7d161bb829b71 Gerrit-PatchSet: 1 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Todd Lipcon <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-HasComments: Yes
