joel at rtems.org
Fri Feb 9 13:57:58 UTC 2018
Can you provide a C test case? It would help to see what's going on.
On Feb 9, 2018 2:51 AM, "Mikhail Svetkin" <mikhail.svetkin at gmail.com> wrote:
> Thank you,
> But why i can see different results?
> shell function prints:
> Total bytes free: 5351936
> malloc_free_space return 1135128
> Best regards,
> On 9 February 2018 at 01:19, Chris Johns <chrisj at rtems.org> wrote:
>> On 09/02/2018 00:59, Mikhail Svetkin wrote:
>> > Hi all,
>> > I am trying to investigate memory leak in my application.
>> > I check malloc information via malloc_free_space
>> > and rtems_shell_main_malloc_info and i see after some times that they
>> > different results.
>> > For example:
>> > rtems_shell_main_malloc_info prints 2mb and malloc_free_space prints 1mb
>> > Which function should i use?
>> There is a malloc shell command if you have the shell working or you
>> could call
>> the shell command directly:
>> [/] # malloc
>> C Program Heap and RTEMS Workspace are the same.
>> Number of free blocks: 298
>> Largest free block: 160667680
>> Total bytes free: 160971752
>> Number of used blocks: 6707
>> Largest used block: 33554440
>> Total bytes used: 97291328
>> Size of the allocatable area in bytes: 258263080
>> Minimum free size ever in bytes: 160926264
>> Maximum number of free blocks ever: 314
>> Maximum number of blocks searched ever: 90
>> Lifetime number of bytes allocated: 1116295560
>> Lifetime number of bytes freed: 1019006776
>> Total number of searches: 28918650
>> Total number of successful allocations: 28446143
>> Total number of failed allocations: 0
>> Total number of successful frees: 28439436
>> Total number of successful resizes: 120
> users mailing list
> users at rtems.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the users