2024-04-22 00:09:51 +08:00

21 lines
494 B
C

#ifndef __vmem_H
#define __vmem_H
#include "vstdint.h"
#include "vstdlib.h"
/**< Memory block size is 32 bytes */
#define VMEM_BLOCK_SIZE (32)
/**< Size of memory pool */
#define VMEM_POOL_SIZE (40 * 1024) /* 40K */
/**< Size of memory management table */
#define VMEM_MTABLE_SIZE (VMEM_POOL_SIZE / VMEM_BLOCK_SIZE)
/**
* \brief check dynamic memory usage
* \return usage rate (0 - 100) as (0% - 100%)
*/
uint8_t vmem_used(void);
#endif