Merge "Add getloadavg(3)."
diff --git a/libc/include/malloc.h b/libc/include/malloc.h
index 58a9b1d..42237d0 100644
--- a/libc/include/malloc.h
+++ b/libc/include/malloc.h
@@ -161,8 +161,18 @@
*/
int malloc_info(int __must_be_zero, FILE* __fp) __INTRODUCED_IN(23);
-/** mallopt() option to set the decay time. Valid values are 0 and 1. */
+/**
+ * mallopt() option to set the decay time. Valid values are 0 and 1.
+ *
+ * Available since API level 27.
+ */
#define M_DECAY_TIME -100
+/**
+ * mallopt() option to immediately purge any memory not in use. This
+ * will release the memory back to the kernel. The value is ignored.
+ *
+ * Available since API level 28.
+ */
#define M_PURGE -101
/**
diff --git a/tests/grp_pwd_test.cpp b/tests/grp_pwd_test.cpp
index 1c36dcf..ca34205 100644
--- a/tests/grp_pwd_test.cpp
+++ b/tests/grp_pwd_test.cpp
@@ -250,7 +250,9 @@
// Upgrading devices launched before API level 28 may not comply with the below check.
// Due to the difficulty in changing uids after launch, it is waived for these devices.
- if (android::base::GetIntProperty("ro.product.first_api_level", 0) < 28) {
+ // Also grant this check for device launched with 28(P) to give the vendor time to
+ // adopt the AID scheme.
+ if (android::base::GetIntProperty("ro.product.first_api_level", 0) <= 28) {
return;
}
@@ -584,6 +586,10 @@
TEST(pwd, vendor_prefix_users) {
#if defined(__BIONIC__)
+ if (android::base::GetIntProperty("ro.product.first_api_level", 0) <= 28) {
+ return;
+ }
+
TestAidNamePrefix("/vendor/etc/passwd");
#else
print_no_getpwnam_test_info();
@@ -592,6 +598,10 @@
TEST(pwd, vendor_prefix_groups) {
#if defined(__BIONIC__)
+ if (android::base::GetIntProperty("ro.product.first_api_level", 0) <= 28) {
+ return;
+ }
+
TestAidNamePrefix("/vendor/etc/group");
#else
print_no_getgrnam_test_info();