Valgrind 3.15 not detecting memory leaks

Hello All,
I have used a sample C program which doesn't free allocated heap memory during process stop. Tried Valgrind to see any leaks reporting.But no leaks eventhough there are possible leaks.

Expecting some help/directions on what could be missing to get the leak report.

Below are my code, compiler used along with Valgrind.

char *ptr = NULL;
printf("Doing memory alloc\n");
ptr = malloc(100);
if (!ptr) {
    printf("Malloc failure\n");
    return -1;
memset(ptr, 0, 50);
strcpy(ptr, "Valgrind leak Analysis!!!\n");
printf("%s\n", ptr);
return 0;

Valgrind output:
root@Bean10:/home/superadmin# valgrind --tool=memcheck --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose ./leaks
==13587== Memcheck, a memory error detector
==13587== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==13587== Using Valgrind-3.15.0-608cb11914-20190413 and LibVEX; rerun with -h for copyright info
==13587== Command: ./leaks
--13587-- Contents of /proc/version:
--13587-- Linux version 5.4.164 (renv@bbd-svr-ubt20-004) (gcc version 7.5.0 (OpenWrt GCC 7.5.0 r11-afafb2b1c)) #0 SMP PREEMPT Mon Jun 5 15:00:29 2023
--13587-- Arch and hwcaps: ARM64, LittleEndian, baseline
--13587-- Page sizes: currently 4096, max supported 65536
--13587-- Valgrind library directory: /usr/lib/valgrind
--13587-- Reading syms from /home/superadmin/leaks
Doing memory alloc
Valgrind leak Analysis!!!
==13587== HEAP SUMMARY:
==13587== in use at exit: 0 bytes in 0 blocks
==13587== total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==13587== All heap blocks were freed -- no leaks are possible
==13587== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

Below are the cross compiler used and version details:

aarch64-openwrt-linux-musl-gcc -g leaks.c
aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 7.5.0 r11-afafb2b1c) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO

Thanks in Advance..

Tried newer compiler and Valgrind ?

100 bytes is too little, it does not allocate new segments and does not resize the heap, this is less than a page size.

Try at least 8 KB or something bigger.

@ValdikSS : Thanks for pointing out in terms of allocator perspective. But the same 100bytes leaks were showing in my native linux platform.
Do this valgrind output varies b/w platforms?

Below are my compiler and valgrind info.
Valgrind Details:

bin/valgrind: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/, BuildID[sha1]=8dfce59e99f216993bb1e2cc2ccd1a069a467607, for GNU/Linux 3.2.0, with debug_info, not stripped
$ ./bin/valgrind --version

Compiler Details:

$ file /usr/bin/x86_64-linux-gnu-gcc-9
/usr/bin/x86_64-linux-gnu-gcc-9: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/, BuildID[sha1]=5dd39a405e0fef1a51f319c7aac463dfa26e1421, for GNU/Linux 3.2.0, stripped
$ gcc --version
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.