23 lines
703 B
C
Executable File
23 lines
703 B
C
Executable File
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <stdint.h>
|
|
|
|
#include "esp_system.h"
|
|
#include "esp_heap_caps.h"
|
|
|
|
int eft_server_shell() {
|
|
printf("\033[2J\033[H");
|
|
printf("EFT server shell running\n");
|
|
|
|
size_t internal = heap_caps_get_free_size(MALLOC_CAP_INTERNAL);
|
|
size_t total = esp_get_free_heap_size();
|
|
size_t max_block = heap_caps_get_largest_free_block(MALLOC_CAP_8BIT);
|
|
|
|
printf("\n--- Memory Check ---\n");
|
|
printf(" Internal RAM free: %u KB\n", internal / 1024);
|
|
printf(" Total Heap free: %u KB\n", total / 1024);
|
|
printf(" Max Alloc Block: %u KB\n", max_block / 1024);
|
|
printf("---------------------------\n");
|
|
|
|
return 0;
|
|
} |