亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mem.c

?? 基于56F8346的異步電機VVVF控制程序。
?? C
?? 第 1 頁 / 共 4 頁
字號:
/** ###################################################################
**
**     (c) Freescale Semiconductor
**     2004 All Rights Reserved
**
**
**     (c) Copyright UNIS, spol. s r.o. 1997-2004
**     UNIS, spol. s r.o.
**     Jundrovska 33
**     624 00 Brno
**     Czech Republic
**     http      : www.processorexpert.com
**     mail      : info@processorexpert.com
** ###################################################################*/

/* File: memory.c */

#include "port.h"
#include "mem.h"
#include "arch.h"
#include "assert.h"
#include <string.h>
#include <stdio.h>

#ifdef MEM_THREADED_OS
#include "pthread.h"
#endif

/*******************************************************
* memory Package
*******************************************************/

#define ADDRESSING_8

bool        bMemInitialized = false;
mem_sPool   InternalMemoryPool;
mem_sPool   ExternalMemoryPool;
mem_sState  InitialState;
static void Initialize (void);


/*******************************************************
*
* Method: memMallocIM
*
* Description: This function allocates dynamic memory
*              of the specified size from the memory
*              partitions. The function memMallocIM
*              first tries to allocate the memory from
*              the internal memory partition. However,
*              if not enough space exists in the internal
*              memory partition to satisfy the dynamic
*              memory allocation, memMallocIM then tries
*              the allocation from the external memory partition.
*
* Arguments:
*       size - the size of the memory buffer to be
*              allocated in internal memory
*
* Return:      If memory is insufficient to satisfy the request
*              from either partition, memMallocIM returns NULL
*
*******************************************************/
void *  memMallocIM (size_t size)
{
  void * pMem;

  pMem=memMalloc(&InternalMemoryPool, size);
  if(pMem == NULL){
    pMem=memMalloc(&ExternalMemoryPool, size);
  }
  return pMem;
}


/*******************************************************
*
* Method: memCallocIM
*
* Description: This function dynamically allocates an array
*              with elements initialized to zero.
*              The memCallocIM function first tries to
*              reallocate the memory from the internal
*              memory partition. However,
*              if not enough space exists in the internal
*              memory partition to satisfy the dynamic
*              memory allocation, memMallocIM then tries
*              the allocation from the external memory partition.
*
* Arguments:
*       num  - the number of elements
*       size - the size of the memory buffer to be
*              allocated in internal memory
*
* Return:      If memory is insufficient to satisfy the request
*              from either partition, memCallocIM returns NULL
*
*******************************************************/
void *  memCallocIM (size_t num, size_t size)
{
  void * pMem;

  pMem=memCalloc(&InternalMemoryPool, num, size);
  if(pMem == NULL){
    pMem=memCalloc(&ExternalMemoryPool, num, size);
  }
  return pMem;
}


/*******************************************************
*
* Method: memReallocIM
*
* Description: This function dynamically reallocates and
*              resizes a memory buffer to the specified
*              size from the memory partitions. The function
*              memReallocIM first tries to reallocate
*              the memory from the internal memory partition.
*              However, if not enough space exists in
*              the internal memory partition to satisfy
*              the dynamic memory allocation, memReallocIM
*              then tries the allocation from the external
*              memory partition
*
* Arguments:
*   memblock - the address of the existing memory block
*              to reallocate
*       size - the new size of the memory buffer to be
*              allocated in internal memory
*
* Return:      If memory is insufficient to satisfy the request
*              from either partition, memReallocIM returns NULL
*
*******************************************************/
void * memReallocIM ( void *memblock, size_t size )
{
  void * pMem;

  pMem=memRealloc(&InternalMemoryPool, memblock, size);
  if(pMem == NULL){
    pMem=memRealloc(&ExternalMemoryPool, memblock, size);
  }
  return pMem;
}


/*******************************************************
*
* Method: memMallocAlignedIM
*
* Description: This function allocates dynamic memory
*              of the specified size from the memory
*              partitions and aligns the memory properly
*              to use modulo addressing. The function
*              memMallocAlignedIM first tries to allocate
*              the memory, properly aligned, from
*              the internal memory partition. However,
*              if not enough space exists in the internal
*              memory partition to satisfy the dynamic
*              memory allocation, or if the memory request
*              cannot be properly aligned, memMallocAlignedIM
*              then tries the allocation from the external
*              memory partition. If memMallocAlignedIM
*              cannot allocate an aligned buffer from
*              either partition, it calls memMallocIM
*              to try to allocate a buffer of the correct
*              size without the proper alignment.
*
* Arguments:
*       size - the new size of the memory buffer to be
*              allocated in internal memory
*
* Return:      If memory is insufficient to satisfy the request
*              from either partition, memMallocAlignedIM returns NULL
*
*******************************************************/
void *  memMallocAlignedIM (size_t size)
{
  void * pMem;

  pMem=memMallocAligned(&InternalMemoryPool, size);
  if(pMem == NULL){
    pMem=memMallocAligned(&ExternalMemoryPool, size);
    if(pMem == NULL){
      pMem=memMallocIM(size);
    }
  }
  return pMem;
}


/*******************************************************
*
* Method: memFreeIM
*
* Description: This function deallocates a memory block
*              in internal memory that previously had
*              been dynamically allocated with
*              the routine memMallocIM.
*
* Arguments:
*   memblock - pointer to previously allocated memory
*
* Return:      None
*
*******************************************************/
void memFreeIM (void * memblock)
{
  if(memIsIM(memblock)){
    memFree(&InternalMemoryPool, memblock);
  } else {
    memFree(&ExternalMemoryPool, memblock);
  }
}


/*******************************************************
*
* Method: memMallocEM
*
* Description: This function allocates dynamic memory
*              of the specified size from the memory
*              partitions. The function memMallocEM
*              first tries to allocate the memory from
*              the external memory partition. However,
*              if not enough space exists in the external
*              memory partition to satisfy the dynamic
*              memory allocation, memMallocEM then tries
*              the allocation from the internal memory partition.
*
* Arguments:
*       size - the size of the memory buffer to be
*              allocated in external memory
*
* Return:      If memory is insufficient to satisfy the request
*              from either partition, memMallocIM returns NULL
*
*******************************************************/
void *  memMallocEM (size_t size)
{
  void * pMem;

  pMem = memMalloc (&ExternalMemoryPool, size);
  if (pMem == NULL){
    pMem = memMalloc (&InternalMemoryPool, size);
  }
  return pMem;
}


/*******************************************************
*
* Method: memCallocEM
*
* Description: This function dynamically allocates an array
*              with elements initialized to zero.
*              The memCallocEM function first tries to
*              reallocate the memory from the external
*              memory partition. However,
*              if not enough space exists in the external
*              memory partition to satisfy the dynamic
*              memory allocation, memCallocEM then tries
*              the allocation from the internal memory partition.
*
* Arguments:
*       num  - the number of elements
*       size - the size of the memory buffer to be
*              allocated in external memory
*
* Return:      If memory is insufficient to satisfy the request
*              from either partition, memCallocIM returns NULL
*
*******************************************************/
void *  memCallocEM (size_t num, size_t size)
{
  void * pMem;

  pMem = memCalloc (&ExternalMemoryPool, num, size);
  if (pMem == NULL) {
    pMem = memCalloc (&InternalMemoryPool, num, size);
  }
  return pMem;
}


/*******************************************************
*
* Method: memReallocEM
*
* Description: This function dynamically reallocates and
*              resizes a memory buffer to the specified
*              size from the memory partitions. The function
*              memReallocEM first tries to reallocate
*              the memory from the external memory partition.
*              However, if not enough space exists in
*              the external memory partition to satisfy
*              the dynamic memory allocation, memReallocEM
*              then tries the allocation from the internal
*              memory partition
*
* Arguments:
*   memblock - the address of the existing memory block
*              to reallocate
*       size - the new size of the memory buffer to be
*              allocated in internal memory
*
* Return:      If memory is insufficient to satisfy the request
*              from either partition, memReallocIM returns NULL
*
*******************************************************/
void * memReallocEM ( void *memblock, size_t size )
{
  void * pMem;

  pMem = memRealloc (&ExternalMemoryPool, memblock, size);
  if (pMem == NULL) {
    pMem = memRealloc (&InternalMemoryPool, memblock, size);
  }
  return pMem;
}


/*******************************************************
*
* Method: memMallocAlignedEM
*
* Description: This function allocates dynamic memory
*              of the specified size from the memory
*              partitions and aligns the memory properly
*              to use modulo addressing. The function
*              memMallocAlignedEM first tries to allocate
*              the memory, properly aligned, from
*              the external memory partition. However,
*              if not enough space exists 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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久久久久久岛国免费| 91丨porny丨户外露出| 波多野洁衣一区| 国产亚洲欧美激情| 日韩二区三区四区| 91精品国产综合久久久久久| 五月天激情小说综合| 欧美日高清视频| 麻豆一区二区在线| 婷婷开心久久网| 亚洲国产日韩一级| 亚洲欧美日韩国产综合| 国产精品久久久久毛片软件| 综合在线观看色| 国产精品成人在线观看| 亚洲日本成人在线观看| 天天免费综合色| 另类小说视频一区二区| 不卡一区二区三区四区| 欧美自拍偷拍一区| 亚洲精品一区二区三区蜜桃下载| 精品国产电影一区二区| 国产精品福利一区二区三区| 亚洲激情中文1区| 日本不卡123| 日韩国产成人精品| 国产iv一区二区三区| 欧美日韩一区二区三区不卡| 久久久久久久久97黄色工厂| 国产精品污网站| 久久97超碰色| 欧美日韩国产不卡| 久久久久久久久久电影| 精品一区二区成人精品| 91精品国产综合久久久久久漫画 | 精品在线一区二区| 欧美色图天堂网| 91国产精品成人| 欧美区在线观看| 麻豆精品在线看| 亚洲久草在线视频| 国产午夜精品久久久久久免费视 | 国产999精品久久| 亚洲国产欧美日韩另类综合 | 日本午夜一区二区| 欧美性三三影院| 亚洲天堂av一区| www.欧美.com| 中文字幕精品在线不卡| av一本久道久久综合久久鬼色| 日韩一级免费观看| 国产精品美女久久久久久久久| 精品在线你懂的| 亚洲精品免费电影| 在线亚洲欧美专区二区| 成人免费视频一区| 国产成人三级在线观看| 激情欧美日韩一区二区| 麻豆精品精品国产自在97香蕉| 视频一区视频二区在线观看| 亚洲成在人线免费| 麻豆精品一区二区三区| 青青草精品视频| 亚洲大片在线观看| 91.xcao| 国产精品免费av| 成人激情黄色小说| 国产精品18久久久久久vr| 久久精品国产澳门| 国产mv日韩mv欧美| 成人激情视频网站| 99久久精品国产导航| 国产成人综合精品三级| 不卡的电影网站| 99精品视频在线观看| 91色|porny| 日韩久久久精品| 久久蜜臀中文字幕| 一区二区成人在线视频| 六月丁香综合在线视频| 成人看片黄a免费看在线| 色婷婷狠狠综合| 欧美大片一区二区三区| 日韩毛片视频在线看| 美女精品一区二区| 91免费在线看| 国产清纯美女被跳蛋高潮一区二区久久w | 亚洲日本免费电影| 久久99久久精品| 91黄色免费观看| 国产情人综合久久777777| 午夜欧美大尺度福利影院在线看| 国产乱色国产精品免费视频| 欧美日韩视频在线观看一区二区三区 | 国产精品久久久久久久久图文区| 青青草97国产精品免费观看| 国产精品一区一区| 久久精品国产在热久久| 日韩在线播放一区二区| 亚洲猫色日本管| 午夜精品一区在线观看| 蜜桃一区二区三区在线观看| 日韩国产一二三区| 婷婷久久综合九色综合绿巨人| 国产无一区二区| 亚洲同性gay激情无套| 夜夜夜精品看看| 免费av成人在线| 成人午夜av影视| 欧美在线一区二区三区| 欧美一激情一区二区三区| 国产喷白浆一区二区三区| 亚洲黄色性网站| 国模少妇一区二区三区| 91免费观看视频| 日韩三级在线观看| 综合亚洲深深色噜噜狠狠网站| 亚洲一级片在线观看| 国产乱人伦精品一区二区在线观看 | 色狠狠综合天天综合综合| 91精品国产免费久久综合| 中文字幕制服丝袜成人av| 日本中文字幕一区| 成人激情黄色小说| 日韩一级在线观看| 一区二区三区欧美久久| 国产乱一区二区| 7777精品伊人久久久大香线蕉经典版下载| 国产亚洲欧美中文| 午夜精品福利一区二区蜜股av | 欧美成人精品1314www| 自拍偷在线精品自拍偷无码专区| 蜜桃av一区二区| 在线观看三级视频欧美| 亚洲国产精品99久久久久久久久| 日韩在线观看一区二区| 一本久久a久久精品亚洲| 2021中文字幕一区亚洲| 亚洲国产视频一区二区| 成人av手机在线观看| 日韩精品中文字幕在线不卡尤物| 亚洲乱码中文字幕| 成人小视频在线观看| 精品国产91九色蝌蚪| 天天免费综合色| 欧洲一区二区三区在线| 国产三级精品视频| 麻豆一区二区在线| 日韩一区二区在线观看| 丝袜美腿亚洲一区二区图片| 91九色02白丝porn| 国产精品国产自产拍高清av王其| 国产精品影视天天线| 欧美xxxx老人做受| 男男gaygay亚洲| 欧美日韩在线三区| 亚洲成年人网站在线观看| 91丝袜美腿高跟国产极品老师| 欧美极品xxx| 成人免费观看视频| 中文字幕不卡在线播放| 国产高清不卡一区| 久久品道一品道久久精品| 九九久久精品视频| 久久综合资源网| 国产精品1024| 国产精品的网站| 91欧美激情一区二区三区成人| 国产精品不卡一区二区三区| 成人av网站在线观看免费| 亚洲色欲色欲www| 色乱码一区二区三区88| 亚洲情趣在线观看| 欧洲av一区二区嗯嗯嗯啊| 1区2区3区欧美| 在线观看不卡一区| 污片在线观看一区二区 | 精品国产乱码久久久久久免费| 九色porny丨国产精品| wwwwww.欧美系列| 不卡的电影网站| 亚洲欧美日本韩国| 在线91免费看| 激情av综合网| 亚洲色图制服诱惑| 欧美日韩国产精品自在自线| 蜜臀av一级做a爰片久久| 欧美精品一区二区久久婷婷| 国产电影一区在线| 玉足女爽爽91| 日韩视频在线观看一区二区| 国产一区二区主播在线| 国产精品免费aⅴ片在线观看| 91视频www| 日本免费在线视频不卡一不卡二| 久久综合成人精品亚洲另类欧美| 国产成人精品www牛牛影视| 亚洲精品免费在线| 精品免费一区二区三区| 色系网站成人免费|