Google Summer of Code | malloc_info() changes the state of the heap (#41)

Joel Sherrill (@joel) gitlab at rtems.org
Thu Mar 5 21:37:52 UTC 2026




Joel Sherrill commented on a discussion: https://gitlab.rtems.org/rtems/programs/gsoc/-/issues/41#note_144434


__free()_ is defined by the C Standard Library and POSIX and we must adhere to the behavior and signature which is [defined](https://pubs.opengroup.org/onlinepubs/9799919799/functions/free.html) as:

`void free(void *ptr);`

I do like the idea of reporting the number of deferred blocks. Is there any information kept on deferred frees or will it have to be generated?

It may also be a good idea to add a function to the RTEMS Malloc Family to let the user force the processing of the deferred list. The deferred free's reflect memory mostly freed from interrupt service routines. The use case we are focusing on is from the "foreground" tasks' perspective. They have no way to know when an ISR runs or frees memory. They should be able to snapshot resources, use malloc info, etc. with expected results.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/programs/gsoc/-/issues/41#note_144434
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/20260305/e2cbbb0c/attachment.htm>


More information about the bugs mailing list