1 #ifndef ADF_OS_MEM_PVT_H
2 #define ADF_OS_MEM_PVT_H
5 #include "Magpie_api.h"
7 static inline void * __adf_os_mem_alloc(adf_os_size_t size)
9 // return (malloc(size,M_DEVBUF,M_DONTWAIT | M_ZERO));
10 return A_ALLOCRAM(size);
13 static inline void __adf_os_mem_free(void *buf)
15 //Should not be called in FW!
19 /* move a memory buffer */
20 static inline void __adf_os_mem_copy(void *dst, void *src, adf_os_size_t size)
22 A_MEMCPY(dst,src,size);
25 /* set a memory buffer */
27 __adf_os_mem_set(void *buf, a_uint8_t b, adf_os_size_t size)
29 A_MEMSET(buf, b, size);
32 __adf_os_mem_move(void *dst, void *src, adf_os_size_t size)
34 A_MEMMOVE(dst, src, size);
36 /* zero a memory buffer */
38 __adf_os_mem_zero(void *buf, adf_os_size_t size)
42 /* compare two memory buffers */
44 __adf_os_mem_cmp(void *buf1, void *buf2, adf_os_size_t size)
46 return (A_MEMCMP (buf1, buf2, size) == 0) ? 0 : 1;