mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 20:41:14 +00:00
Allocate some memories in SPIRAM first.
Try to allocate some WiFi and LWIP memories in SPIRAM first. If failed, try to allocate in internal RAM then.
This commit is contained in:
@@ -121,6 +121,41 @@ esp_err_t esp_wifi_internal_reg_rxcb(wifi_interface_t ifx, wifi_rxcb_t fn);
|
||||
*/
|
||||
esp_err_t esp_wifi_internal_set_sta_ip(void);
|
||||
|
||||
/**
|
||||
* @brief Allocate a chunk of memory for WiFi driver
|
||||
*
|
||||
* @attention This API is not used for DMA memory allocation.
|
||||
*
|
||||
* @param size_t size : Size, in bytes, of the amount of memory to allocate
|
||||
*
|
||||
* @return A pointer to the memory allocated on success, NULL on failure
|
||||
*/
|
||||
void *wifi_malloc( size_t size );
|
||||
|
||||
/**
|
||||
* @brief Reallocate a chunk of memory for WiFi driver
|
||||
*
|
||||
* @attention This API is not used for DMA memory allocation.
|
||||
*
|
||||
* @param void * ptr : Pointer to previously allocated memory, or NULL for a new allocation.
|
||||
* @param size_t size : Size, in bytes, of the amount of memory to allocate
|
||||
*
|
||||
* @return A pointer to the memory allocated on success, NULL on failure
|
||||
*/
|
||||
void *wifi_realloc( void *ptr, size_t size );
|
||||
|
||||
/**
|
||||
* @brief Callocate memory for WiFi driver
|
||||
*
|
||||
* @attention This API is not used for DMA memory allocation.
|
||||
*
|
||||
* @param size_t n : Number of continuing chunks of memory to allocate
|
||||
* @param size_t size : Size, in bytes, of the amount of memory to allocate
|
||||
*
|
||||
* @return A pointer to the memory allocated on success, NULL on failure
|
||||
*/
|
||||
void *wifi_calloc( size_t n, size_t size );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user