mirror of
https://gitee.com/Lamdonn/varch.git
synced 2025-12-06 08:46:42 +08:00
21 lines
494 B
C
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
|