Skip to content

Commit 0e805ce

Browse files
committed
Limit ringbuffer size in Trusty
The allocation ringbuffer has a size of 32768 entries by default, totalling over a megabyte. In addition, a recent change moved this buffer from .bss to being dynamically allocated, which means it counts against the min_heap setting in the app manifest. Bug: 265957160 Change-Id: Ib71f1565810bb5704131d7eefac54e4c5e0afa02
1 parent 6690a90 commit 0e805ce

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

standalone/flags.inc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,10 @@ SCUDO_FLAG(int, soft_rss_limit_mb, 0,
5555
"subsequent calls will fail or return NULL until the RSS goes below "
5656
"the soft limit")
5757

58+
#if SCUDO_TRUSTY
59+
SCUDO_FLAG(int, allocation_ring_buffer_size, 1,
60+
"Entries to keep in the allocation ring buffer for scudo.")
61+
#else
5862
SCUDO_FLAG(int, allocation_ring_buffer_size, 32768,
5963
"Entries to keep in the allocation ring buffer for scudo.")
64+
#endif

0 commit comments

Comments
 (0)