RTEMS | cpukit/libcsupport: Implement malloc_usable_size (!591)
Jeremy Lorelli (@jjl77)
gitlab at rtems.org
Sat Jul 19 02:25:42 UTC 2025
Jeremy Lorelli commented on a discussion on testsuites/libtests/malloctest/init.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/591#note_126927
> +
> + p1 = malloc(120);
> + rtems_test_assert( p1 != NULL );
> + rtems_test_assert( errno == -1 );
> +
> + sz1 = malloc_usable_size( p1 );
> + rtems_test_assert( sz1 != 0 );
> + rtems_test_assert( sz1 >= 120 );
> +
> + p2 = malloc( 500 );
> + rtems_test_assert( p2 != NULL );
> + rtems_test_assert( errno == -1 );
> +
> + sz2 = malloc_usable_size( p1 );
> + rtems_test_assert( sz2 != 0 );
> + rtems_test_assert( sz1 >= sz2 );
I've revised the test to remove this assumption
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/591#note_126927
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250719/aa216378/attachment-0001.htm>
More information about the bugs
mailing list