heap_alloc_caps.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. // http://www.apache.org/licenses/LICENSE-2.0
  7. //
  8. // Unless required by applicable law or agreed to in writing, software
  9. // distributed under the License is distributed on an "AS IS" BASIS,
  10. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. // See the License for the specific language governing permissions and
  12. // limitations under the License.
  13. #ifndef HEAP_ALLOC_CAPS_H
  14. #define HEAP_ALLOC_CAPS_H
  15. #define MALLOC_CAP_EXEC (1<<0) //Memory must be able to run executable code
  16. #define MALLOC_CAP_32BIT (1<<1) //Memory must allow for aligned 32-bit data accesses
  17. #define MALLOC_CAP_8BIT (1<<2) //Memory must allow for 8/16/...-bit data accesses
  18. #define MALLOC_CAP_DMA (1<<3) //Memory must be able to accessed by DMA
  19. #define MALLOC_CAP_PID2 (1<<4) //Memory must be mapped to PID2 memory space
  20. #define MALLOC_CAP_PID3 (1<<5) //Memory must be mapped to PID3 memory space
  21. #define MALLOC_CAP_PID4 (1<<6) //Memory must be mapped to PID4 memory space
  22. #define MALLOC_CAP_PID5 (1<<7) //Memory must be mapped to PID5 memory space
  23. #define MALLOC_CAP_PID6 (1<<8) //Memory must be mapped to PID6 memory space
  24. #define MALLOC_CAP_PID7 (1<<9) //Memory must be mapped to PID7 memory space
  25. #define MALLOC_CAP_SPISRAM (1<<10) //Memory must be in SPI SRAM
  26. #define MALLOC_CAP_INVALID (1<<31) //Memory can't be used / list end marker
  27. void heap_alloc_caps_init();
  28. void *pvPortMallocCaps(size_t xWantedSize, uint32_t caps);
  29. #endif