XuNeo commented on code in PR #2698:
URL: https://github.com/apache/nuttx-apps/pull/2698#discussion_r1803342396
##########
testing/mm/mm_main.c:
##########
@@ -124,6 +124,17 @@ static struct mallinfo g_alloc_info;
* Private Functions
****************************************************************************/
+static bool is_oversize(int size)
+{
+ if (size < 0)
+ {
+ return 0;
+ }
+
+ unsigned long threshold = g_alloc_info.mxordblk * 3 / 4;
+ return threshold < size;
+}
Review Comment:
Let's be normal person.
```suggestion
static bool is_oversize(int size)
{
if (size < 0)
{
return false;
}
unsigned long threshold = g_alloc_info.mxordblk * 3 / 4;
return size > threshold;
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]