[PATCH] D73824: scudo: Table driven size classes for Android allocator.
Kostya Kortchinsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 10 09:51:00 PST 2020
cryptoad added a comment.
I think this looks good.
I tried it on Android and it seems to be doing as advertised, have you tried this on Fuchsia/Linux? I'm currently giving it a go in g3.
================
Comment at: compiler-rt/lib/scudo/standalone/size_class_map.h:90
static uptr getClassIdBySize(uptr Size) {
+ if (Size <= SizeDelta + (1 << Config::MinSizeLog))
+ return 1;
----------------
Do we want to do this here or make sure that any call to this function will fall into the next if? I am not sure which one is better.
================
Comment at: compiler-rt/lib/scudo/standalone/tests/combined_test.cpp:167
void *NewP = Allocator->reallocate(P, NewSize);
+ P = NewP;
EXPECT_EQ(NewP, P);
----------------
Why that line?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73824/new/
https://reviews.llvm.org/D73824
More information about the llvm-commits
mailing list