memory_pool: memory_pool_is_freed(pool,obj) — поиск obj в free-списке
tw_pcbs (3 места): !ctx→halt и is_freed→halt в начале итерации
— ловит висячий PCB до re-alloc и после re-alloc
etcp: is_freed→halt перед etcp_conn_input (caller + callee)
— ловит pkt освобождённый до входа
tcp_alloc: убран старый скан tw_pcbs (заменён на is_freed)
все dangling проверки — halt (while(1)) вместо break/return
memory_pool: +2 байта за объектом — canary 0xAA для детекции buffer overflow,
counter для детекции double-free. При free проверяется canary и counter==0,
при alloc выставляется новый counter.
lwip_tcp: убраны TCP_TW_MAX и счётчики tw_iter (толку нет, краш на 2й итерации).
Оставлены: !pcb->ctx (dangling pointer), self-loop checks, next_owner диагностика.
Добавлена проверка в tcp_alloc: если новый PCB найден в tw_pcbs → halt.
- Add timeout_heap_get_size() to get active timer count
- Add global counters in memory_pool: g_total_free and g_total_allocated
- Simplify busy memory calculation to single formula:
busy = memory_pool_get_total_allocated() - memory_pool_get_total_free_blocks()
- Add new IDC_EDIT_ACTIVE_TIMEOUTS and IDC_EDIT_BUSY_MEMORY to GUI
- Fixed incorrect init_connections() call in test_etcp_simple_traffic.c (was calling server_instance instead of client_instance)
- Fixed double free in timeout_heap_pop() when handling deleted elements
- Enhanced NULL pointer safety in uasync_print_resources() by removing complex heap manipulation
- Added debug logging to timeout_heap_pop() for better error tracking
Test results: test_etcp_simple_traffic now passes without double free errors