espressif / esp-protocols

Collection of ESP-IDF components related to networking protocols
165 stars 115 forks source link

Add memory_type Support for Flexible Memory Allocation in WebSocket Client to permit other memory type caps to be used (IDFGH-13127) #586

Open filzek opened 1 month ago

filzek commented 1 month ago

Enable Usage of External or Specific Memory Types in WebSocket

Feature: Added a memory_type directive to esp_websocket_client_config_t to allow usage of various memory types in heap_caps_malloc and heap_caps_calloc.

Default Handling: If memory_type is not defined or is invalid, MALLOC_CAP_DEFAULT is used. HTTP Auth Update: Updated http_auth_basic function to use the specified memory region.

All relevant functions have been updated to utilize the new memory_type configuration.

Now can set any memory CAPS region such as MALLOC_CAP_SPIRAM and others.

erkia commented 1 week ago

+1 Maybe allocate websocket task stack also from selected RAM by using xTaskCreateWithCaps?

gabsuren commented 4 days ago

@filzek Thank you for your contribution. However, the changes are causing compilation issues in our CI pipeline. Please refer to the details here: https://github.com/espressif/esp-protocols/actions/runs/9708563633/job/26876119855?pr=586

filzek commented 14 hours ago

@filzek Thank you for your contribution. However, the changes are causing compilation issues in our CI pipeline. Please refer to the details here: https://github.com/espressif/esp-protocols/actions/runs/9708563633/job/26876119855?pr=586

changes made to the original file as requested!