[PATCH] D146324: scudo: Don't define mallinfo2 on Android.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 17 14:48:31 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG9f42b04128bc: scudo: Don't define mallinfo2 on Android. (authored by pcc).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146324/new/
https://reviews.llvm.org/D146324
Files:
compiler-rt/lib/scudo/standalone/wrappers_c.inc
Index: compiler-rt/lib/scudo/standalone/wrappers_c.inc
===================================================================
--- compiler-rt/lib/scudo/standalone/wrappers_c.inc
+++ compiler-rt/lib/scudo/standalone/wrappers_c.inc
@@ -54,6 +54,8 @@
return Info;
}
+// On Android, mallinfo2 is an alias of mallinfo, so don't define both.
+#if !SCUDO_ANDROID
INTERFACE WEAK struct __scudo_mallinfo2 SCUDO_PREFIX(mallinfo2)(void) {
struct __scudo_mallinfo2 Info = {};
scudo::StatCounters Stats;
@@ -70,6 +72,7 @@
Info.fordblks = Info.fsmblks;
return Info;
}
+#endif
INTERFACE WEAK void *SCUDO_PREFIX(malloc)(size_t size) {
return scudo::setErrnoOnNull(SCUDO_ALLOCATOR.allocate(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146324.506200.patch
Type: text/x-patch
Size: 697 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230317/bf28ddf9/attachment.bin>
More information about the llvm-commits
mailing list