⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mem1.h

📁 基于56F8346的异步电机VVVF控制程序。
💻 H
📖 第 1 页 / 共 3 页
字号:
**         function first tries to reallocate the memory from the
**         external memory partition. For example see <Typical Usage
**         > page.
**     Parameters  :
**         NAME            - DESCRIPTION
**         num             - Number of elements
**         size            - Length in bytes of each element
**     Returns     :
**         ---             - If memory is insufficient to satisfy
**                           the request from either partition,
**                           memCallocEM returns NULL.
** ===================================================================
*/

#define MEM1_memMallocAlignedEM(size) memMallocAlignedEM(size)
/*
** ===================================================================
**     Method      :  MEM1_memMallocAlignedEM (bean DSP_MEM)
**
**     Description :
**         The memMallocAlignedEM function allocates dynamic memory
**         of the specified size from the memory partitions and
**         aligns the memory to use modulo addressing. The function
**         memMallocAlignedEM first tries to allocate the memory,
**         properly aligned, from the external memory partition.
**         However, if space is insufficient in the external memory
**         partition to satisfy the dynamic memory allocation, or if
**         the memory request cannot be properly aligned,
**         memMallocAlignedEM then tries the allocation from the
**         internal memory partition. If memMallocAlignedEM cannot
**         allocate an aligned buffer from either partition, it
**         calls memMallocEM to try to allocate a buffer of the
**         correct size without the proper alignment. For example
**         see <Typical Usage > page.
**     Parameters  :
**         NAME            - DESCRIPTION
**         size            - The size of the memory buffer to be
**                           allocated in external memory and aligned
**                           for modulo addressing
**     Returns     :
**         ---             - If memory cannot be allocated in
**                           sufficient size to satisfy the request
**                           from either partition,
**                           memMallocAlignedEM returns NULL
** ===================================================================
*/

#define MEM1_memFreeEM(memblock) memFreeEM(memblock)
/*
** ===================================================================
**     Method      :  MEM1_memFreeEM (bean DSP_MEM)
**
**     Description :
**         The memFreeEM function deallocates a memory block in
**         external memory that previously had been dynamically
**         allocated with the routine memMallocEM. For example see
**         <Typical Usage > page.
**     Parameters  :
**         NAME            - DESCRIPTION
**       * memblock        - Pointer to previously
**                           allocated array
**     Returns     : Nothing
** ===================================================================
*/

#define MEM1_memIsEM(memblock) memIsEM(memblock)
/*
** ===================================================================
**     Method      :  MEM1_memIsEM (bean DSP_MEM)
**
**     Description :
**         The memIsEM function checks the address of a memory block
**         to determine whether it is in internal memory or external
**         memory. For example see <Typical Usage > page.
**     Parameters  :
**         NAME            - DESCRIPTION
**       * memblock        - The address of the memory
**                           block to be confirmed in external memory
**     Returns     :
**         ---             - The function memIsEM returns true if
**                           the address is in external memory;
**                           otherwise, it returns false.
** ===================================================================
*/

                                       /* Memory management utility routines */
#define MEM1_memIsAligned( memblock, size) memIsAligned( memblock, size)
/*
** ===================================================================
**     Method      :  MEM1_memIsAligned (bean DSP_MEM)
**
**     Description :
**         The memIsAligned function checks the address of a memory
**         block to determine whether it is properly aligned to use
**         modulo addressing. For example see <Typical Usage > page.
**     Parameters  :
**         NAME            - DESCRIPTION
**       * memblock        - The address of the memory
**                           block to check alignment for modulo
**                           addressing
**         size            - The size to which the block should be
**                           aligned for modulo addressing
**     Returns     :
**         ---             - The function memIsAligned returns true
**                           if the address is aligned so that modulo
**                           addressing can be used; otherwise, it
**                           returns false.
** ===================================================================
*/

#define MEM1_memInitialize(pMemoryState) memInitialize(pMemoryState)
/*
** ===================================================================
**     Method      :  MEM1_memInitialize (bean DSP_MEM)
**
**     Description :
**         This function initializes the memory manager data structure 
**         (InitialState).
**         This method is internal. It is used by Processor Expert only.
** ===================================================================
*/

#define MEM1_memInitializePool(pMemPool, pMem, Size, Protect, Assert) memInitializePool(pMemPool, pMem, Size, Protect, Assert)
/*
** ===================================================================
**     Method      :  MEM1_memInitializePool (bean DSP_MEM)
**
**     Description :
**         Initializes the memory pool to all zeroes. Brackets the pool 
**         with two blocks: The last sizeof(UInt32) bytes will be set to 
**         0 to indicate the last block of the pool. The first 
**         sizeof(UInt32) bytes of the pool will be set to the size of 
**         the remainder of the pool.
**         This method is internal. It is used by Processor Expert only.
** ===================================================================
*/

#define MEM1_memExtendPool(pMemPool, pMem, Size) memExtendPool(pMemPool, pMem, Size)
/*
** ===================================================================
**     Method      :  MEM1_memExtendPool (bean DSP_MEM)
**
**     Description :
**         Initializes the memory pool extension to all zeroes. Extends 
**         the pool previously initialized with memInitializePool.
**         This method is internal. It is used by Processor Expert only.
** ===================================================================
*/

#define MEM1_memValidate(pMemPool) memValidate(pMemPool)
/*
** ===================================================================
**     Method      :  MEM1_memValidate (bean DSP_MEM)
**
**     Description :
**         This function validates memory pool.
**         This method is internal. It is used by Processor Expert only.
** ===================================================================
*/

#define MEM1_memProtect(pMemPool) memProtect(pMemPool)
/*
** ===================================================================
**     Method      :  MEM1_memProtect (bean DSP_MEM)
**
**     Description :
**         This function set memory protection.
**         This method is internal. It is used by Processor Expert only.
** ===================================================================
*/

#define MEM1_memMallocWrapper(pPool, Size, pFile, Line) memMallocWrapper(pPool, Size, pFile, Line)
/*
** ===================================================================
**     Method      :  MEM1_memMallocWrapper (bean DSP_MEM)
**
**     Description :
**         This method call the base allocator.
**         This method is internal. It is used by Processor Expert only.
** ===================================================================
*/

#define MEM1_memMalloc(pMemPool, Size) memMalloc(pMemPool, Size)
/*
** ===================================================================
**     Method      :  MEM1_memMalloc (bean DSP_MEM)
**
**     Description :
**         This function allocates dynamic memory of the specified size 
**         from the memory partitions.
**         This method is internal. It is used by Processor Expert only.
** ===================================================================
*/

#define MEM1_memMallocAligned(pMemPool, Size) memMallocAligned(pMemPool, Size)
/*
** ===================================================================
**     Method      :  MEM1_memMallocAligned (bean DSP_MEM)
**
**     Description :
**         Allocate memory aligned so that it ends on a 2**k boundary.
**         This method is internal. It is used by Processor Expert only.
** ===================================================================
*/

#define MEM1_memCalloc(pPool, Elements, ElementSize) memCalloc(pPool, Elements, ElementSize)
/*
** ===================================================================
**     Method      :  MEM1_memCalloc (bean DSP_MEM)
**
**     Description :
**         This function dynamically allocates an array with elements 
**         initialized to zero.
**         This method is internal. It is used by Processor Expert only.
** ===================================================================
*/

#define MEM1_memRealloc(pMemPool, pData, SizeRequested) memRealloc(pMemPool, pData, SizeRequested)
/*
** ===================================================================
**     Method      :  MEM1_memRealloc (bean DSP_MEM)
**
**     Description :
**         This function dynamically reallocates and resizes a memory 
**         buffer to the specified size from the memory partitions.
**         This method is internal. It is used by Processor Expert only.
** ===================================================================
*/

#define MEM1_memFree(pMemPool, pData) memFree(pMemPool, pData)
/*
** ===================================================================
**     Method      :  MEM1_memFree (bean DSP_MEM)
**
**     Description :
**         This function deallocates a memory block.
**         This method is internal. It is used by Processor Expert only.
** ===================================================================
*/

#define MEM1_memPrintAllocatedBlocks(pMemPool) memPrintAllocatedBlocks(pMemPool)
/*
** ===================================================================
**     Method      :  MEM1_memPrintAllocatedBlocks (bean DSP_MEM)
**
**     Description :
**         This function prints the allocated blocks.
**         This method is internal. It is used by Processor Expert only.
** ===================================================================
*/

#define MEM1_memCleanUp(pMemPool) memCleanUp(pMemPool)
/*
** ===================================================================
**     Method      :  MEM1_memCleanUp (bean DSP_MEM)
**
**     Description :
**         Starting from the beginning of the pool, merge blocks that are 
**         not in use. Stop at the first in-use block.
**         This method is internal. It is used by Processor Expert only.
** ===================================================================
*/

#define MEM1_memCalculateStatistics(pMemPool) memCalculateStatistics(pMemPool)
/*
** ===================================================================
**     Method      :  MEM1_memCalculateStatistics (bean DSP_MEM)
**
**     Description :
**         This function calculates memory statistics.
**         This method is internal. It is used by Processor Expert only.
** ===================================================================
*/

#define MEM1_memPrintStatistics(pMemPool) memPrintStatistics(pMemPool)
/*
** ===================================================================
**     Method      :  MEM1_memPrintStatistics (bean DSP_MEM)
**
**     Description :
**         This function prints memory statistics.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -