FreeRTOS - memory management best practices - Where could I find it?

Well, the heap4.c configuration it is fine now. The FreeRTOSConfig.h come from a AWS FreeRTOS configuration for the Nordic nRF52840-SDK:

/*
 * FreeRTOS Kernel V10.0.0
 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates.  All Rights Reserved.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of
 * this software and associated documentation files (the "Software"), to deal in
 * the Software without restriction, including without limitation the rights to
 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
 * the Software, and to permit persons to whom the Software is furnished to do so,
 * subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software. If you wish to use our Amazon
 * FreeRTOS name, please do so in a fair use way that does not cause confusion.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 * http://www.FreeRTOS.org
 * http://aws.amazon.com/freertos
 *
 * 1 tab == 4 spaces!
 */


#ifndef FREERTOS_CONFIG_H
#define FREERTOS_CONFIG_H

#ifdef SOFTDEVICE_PRESENT
#include "nrf_soc.h"
#endif

// This port of nrf52 use RTC for freeRTOS tick

/*-----------------------------------------------------------
 * Application specific definitions.
 *
 * These definitions should be adjusted for your particular hardware and
 * application requirements.
 *
 * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
 * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
 *
 * See http://www.freertos.org/a00110.html.
 *----------------------------------------------------------*/
#define configTICK_SOURCE                                                         FREERTOS_USE_RTC
#define configUSE_PREEMPTION                                                      1
#define configUSE_PORT_OPTIMISED_TASK_SELECTION                                   0
#define configUSE_TICKLESS_IDLE                                                   0
#define configUSE_TICKLESS_IDLE_SIMPLE_DEBUG                                      1 /* See into vPortSuppressTicksAndSleep source code for explanation */
#define configCPU_CLOCK_HZ                                                        ( SystemCoreClock )
#define configTICK_RATE_HZ                                                        100
#define configMAX_PRIORITIES                                                      ( 15 )
#define configMINIMAL_STACK_SIZE                                                  ( 600 )
#define configTOTAL_HEAP_SIZE                                                     ( 175000 )
#define configMAX_TASK_NAME_LEN                                                   ( 15 )
#define configUSE_16_BIT_TICKS                                                    0
#define configIDLE_SHOULD_YIELD                                                   1
#define configUSE_MUTEXES                                                         1
#define configUSE_RECURSIVE_MUTEXES                                               1
#define configUSE_COUNTING_SEMAPHORES                                             1
#define configUSE_ALTERNATIVE_API                                                 0    /* Deprecated! */
#define configQUEUE_REGISTRY_SIZE                                                 2
#define configUSE_QUEUE_SETS                                                      0
#define configUSE_TIME_SLICING                                                    0
#define configUSE_NEWLIB_REENTRANT                                                0
#define configENABLE_BACKWARD_COMPATIBILITY                                       1

// Erro na compila��o #define configUSE_DAEMON_TASK_STARTUP_HOOK                       1
#define configSUPPORT_STATIC_ALLOCATION                          0
#define configUSE_APPLICATION_TASK_TAG                                            1
#define configUSE_POSIX_ERRNO                                                     1

#define configSUPPORT_DYNAMIC_ALLOCATION                         1

/* Hook function related definitions. */
#define configUSE_IDLE_HOOK                                      1
#define configUSE_TICK_HOOK                                      0
#define configCHECK_FOR_STACK_OVERFLOW                           1
#define configUSE_MALLOC_FAILED_HOOK                             1

But I am still have some problems:

Compiling .pio\build\wiscore_rak4631\lib920\RAK5801\RAK5801.cpp.o
Compiling .pio\build\wiscore_rak4631\FrameworkArduino\HardwarePWM.cpp.o
Compiling .pio\build\wiscore_rak4631\FrameworkArduino\IPAddress.cpp.o
Compiling .pio\build\wiscore_rak4631\FrameworkArduino\Print.cpp.o
Compiling .pio\build\wiscore_rak4631\FrameworkArduino\Stream.cpp.o
Compiling .pio\build\wiscore_rak4631\FrameworkArduino\Tone.cpp.o
Compiling .pio\build\wiscore_rak4631\FrameworkArduino\Uart.cpp.o
Compiling .pio\build\wiscore_rak4631\FrameworkArduino\WInterrupts.c.o
Compiling .pio\build\wiscore_rak4631\FrameworkArduino\delay.c.o
Compiling .pio\build\wiscore_rak4631\FrameworkArduino\freertos\Source\croutine.c.o
Compiling .pio\build\wiscore_rak4631\FrameworkArduino\freertos\Source\event_groups.c.o
Compiling .pio\build\wiscore_rak4631\FrameworkArduino\freertos\Source\list.c.o
Compiling .pio\build\wiscore_rak4631\FrameworkArduino\freertos\Source\portable\MemMang\heap_4.c.o
Compiling .pio\build\wiscore_rak4631\FrameworkArduino\freertos\Source\queue.c.o
Compiling .pio\build\wiscore_rak4631\FrameworkArduino\freertos\Source\stream_buffer.c.o
C:\Users\Claudio Rosa\.platformio\packages\framework-arduinoadafruitnrf52\cores\nRF5\freertos\Source\portable\MemMang\heap_4.c: In function 'pvPortMalloc':
C:\Users\Claudio Rosa\.platformio\packages\framework-arduinoadafruitnrf52\cores\nRF5\freertos\Source\portable\MemMang\heap_4.c:275:13: warning: implicit declaration of function 'vApplicationMallocFailedHook' [-Wimplicit-function-declaration]
             vApplicationMallocFailedHook();
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Claudio Rosa\.platformio\packages\framework-arduinoadafruitnrf52\cores\nRF5\freertos\Source\portable\MemMang\heap_4.c: At top level:
C:\Users\Claudio Rosa\.platformio\packages\framework-arduinoadafruitnrf52\cores\nRF5\freertos\Source\portable\MemMang\heap_4.c:487:25: error: unknown type name 'HeapStats_t'; did you mean 'TaskStatus_t'?
 void vPortGetHeapStats( HeapStats_t * pxHeapStats )
                         ^~~~~~~~~~~
                         TaskStatus_t
Compiling .pio\build\wiscore_rak4631\FrameworkArduino\freertos\Source\tasks.c.o
Compiling .pio\build\wiscore_rak4631\FrameworkArduino\freertos\Source\timers.c.o
*** [.pio\build\wiscore_rak4631\FrameworkArduino\freertos\Source\portable\MemMang\heap_4.c.o] Error 1
============================================================ [FAILED] Took 38.44 seconds ============================================================