#ifndef __MEMORY_H__ #define __MEMORY_H__ /** * @brief Allocate memory in the fast scratchpad RAM buffer. * * @param size The number of bytes to allocate. Be aware that the scratchpad memory only has 1024 bytes available. * @return Pointer to the allocated buffer in scratchpad memory. */ char *mem_scratch(unsigned short size); void mem_scratch_reset(); /** * @brief Allocate a single primitive in the primitive buffer. * * @param size Size of the primitive struct to allocate. * @return Pointer to the allocated struct in memory. */ void *mem_prim(size_t size); void mem_prim_reset(int db); #endif // __MEMORY_H__