mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-12 05:17:38 +00:00
change(system): heap_caps_alloc returns aligned memory if caps indicate a need for it
The implicit promise of heap_alloc_caps() and friends is that the memory it returns is fit for the purpose as requested in the caps field. Before this commit, that did not happen; e.g. DMA-capable memory wass returned from a correct region, but not aligned/sized to something the DMA subsystem can handle. This commit adds an API to the esp_mm component that is then used by the heap component to adjust allocation alignment, caps and size dependent on the hardware requirement of the requested allocation caps.
This commit is contained in:
@@ -530,7 +530,7 @@ void Cache_Resume_Cache(uint32_t autoload);
|
||||
*
|
||||
* @return uint32_t: 16, 32, 64 Byte
|
||||
*/
|
||||
uint32_t Cache_Get_Cache_Line_Size(void);
|
||||
uint32_t Cache_Get_Line_Size(void);
|
||||
|
||||
/**
|
||||
* @brief Enable freeze for ICache.
|
||||
@@ -574,7 +574,7 @@ void Cache_Travel_Tag_Memory(struct cache_mode * mode, uint32_t filter_addr, voi
|
||||
*
|
||||
* @param struct cache_mode * mode : the cache to calculate the virtual address and the cache mode.
|
||||
*
|
||||
* @param uint32_t tag : the tag part fo a tag item, 12-14 bits.
|
||||
* @param uint32_t tag : the tag part of a tag item, 12-14 bits.
|
||||
*
|
||||
* @param uint32_t addr_offset : the virtual address offset of the cache ways.
|
||||
*
|
||||
|
Reference in New Issue
Block a user