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

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

?? dms.c

?? 基于OMAP1510的Nucleus移植代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*************************************************************************/
/*                                                                       */
/*               Copyright Mentor Graphics Corporation 2002              */
/*                         All Rights Reserved.                          */
/*                                                                       */
/* THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY INFORMATION WHICH IS  */
/* THE PROPERTY OF MENTOR GRAPHICS CORPORATION OR ITS LICENSORS AND IS   */
/* SUBJECT TO LICENSE TERMS.                                             */
/*                                                                       */
/*************************************************************************/

/*************************************************************************/
/*                                                                       */
/* FILE NAME                                               VERSION       */
/*                                                                       */
/*      dms.c                                          Nucleus PLUS 1.14 */
/*                                                                       */
/* COMPONENT                                                             */
/*                                                                       */
/*      DM - Dynamic Memory Management                                   */
/*                                                                       */
/* DESCRIPTION                                                           */
/*                                                                       */
/*      This file contains the supplemental routines for the Dynamic     */
/*      Memory Management component.                                     */
/*                                                                       */
/* DATA STRUCTURES                                                       */
/*                                                                       */
/*      None                                                             */
/*                                                                       */
/* FUNCTIONS                                                             */
/*                                                                       */
/*      DMS_Allocate_Aligned_Memory         Allocate an aligned memory   */
/*                                            block from  a dynamic      */
/*                                            memory pool                */
/* DEPENDENCIES                                                          */
/*                                                                       */
/*      cs_extr.h                           Common Service functions     */
/*      tc_extr.h                           Thread Control functions     */
/*      dm_extr.h                           Partition functions          */
/*      hi_extr.h                           History functions            */
/*                                                                       */
/* HISTORY                                                               */
/*                                                                       */
/*         DATE                    REMARKS                               */
/*                                                                       */
/*      01-15-1999      Created initial revision                         */
/*      03-26-1999      Released 1.11m (new release                      */
/*                        numbering scheme)                              */
/*      04-17-2002      Released version 1.13m                           */
/*      11-07-2002      Released version 1.14                            */
/*************************************************************************/
#define         NU_SOURCE_FILE

#include        "cs_extr.h"                 /* Common service functions  */
#include        "tc_extr.h"                 /* Thread control functions  */
#include        "dm_extr.h"                 /* Dynamic memory functions  */
#include        "hi_extr.h"                 /* History functions         */
#include        "profiler.h"                /* ProView interface         */


/* Define external inner-component global data references.  */


/* Define internal component function prototypes.  */
VOID    DMC_Cleanup(VOID *information);


/*************************************************************************/
/*                                                                       */
/* FUNCTION                                                              */
/*                                                                       */
/*      DMS_Allocate_Aligned_Memory                                      */
/*                                                                       */
/* DESCRIPTION                                                           */
/*                                                                       */
/*      This function allocates memory from the specified dynamic memory */
/*      pool.  If dynamic memory is currently available, this function   */
/*      is completed immediately.  Otherwise, if there is not enough     */
/*      memory currently available, task suspension is possible.         */
/*                                                                       */
/* CALLED BY                                                             */
/*                                                                       */
/*      Application                                                      */
/*                                                                       */
/* CALLS                                                                 */
/*                                                                       */
/*      CSC_Place_On_List                   Place on suspend list        */
/*      [HIC_Make_History_Entry]            Make entry in history log    */
/*      TCC_Suspend_Task                    Suspend calling task         */
/*      TCC_Task_Priority                   Pickup task priority         */
/*      [TCT_Check_Stack]                   Stack checking function      */
/*      TCT_Current_Thread                  Pickup current thread pointer*/
/*      TCT_Protect                         Protect memory pool          */
/*      TCT_Set_Suspend_Protect             Save suspend protection      */
/*      TCT_System_Protect                  Protect system structures    */
/*      TCT_Unprotect                       Release protection           */
/*      TCT_Unprotect_Specific              Release specific protection  */
/*                                                                       */
/* INPUTS                                                                */
/*                                                                       */
/*      pool_ptr                            Memory pool pointer          */
/*      return_pointer                      Pointer to the destination   */
/*                                            memory pointer             */
/*      size                                Number of bytes requested    */
/*      alignment                           Required alignment of        */
/*                                            destination memory pointer */
/*      suspend                             Suspension option if full    */
/*                                                                       */
/* OUTPUTS                                                               */
/*                                                                       */
/*      NU_SUCCESS                          If service is successful     */
/*      NU_NO_MEMORY                        Memory not available         */
/*      NU_TIMEOUT                          If timeout on service        */
/*      NU_POOL_DELETED                     If memory pool deleted       */
/*                                            during suspension          */
/*                                                                       */
/* HISTORY                                                               */
/*                                                                       */
/*         NAME            DATE                    REMARKS               */
/*                                                                       */
/*      T. Larsen       01-15-1999      Created initial revision         */
/*      R. Baum         06-06-2002      Fixed problem with DM_OVERHEAD   */
/*                                        allocation.  Added Proview     */
/*                                        support.                       */
/*                                                                       */
/*************************************************************************/
STATUS  DMS_Allocate_Aligned_Memory(NU_MEMORY_POOL *pool_ptr,
                                    VOID **return_pointer, UNSIGNED size,
                                    UNSIGNED alignment, UNSIGNED suspend)
{
R1 DM_PCB      *pool;                       /* Pool control block ptr    */
R2 DM_SUSPEND  *suspend_ptr;                /* Pointer to suspend block  */
DM_SUSPEND      suspend_block;              /* Allocate suspension block */
R4 DM_HEADER   *memory_ptr;                 /* Pointer to memory         */
R3 DM_HEADER   *new_ptr;                    /* New split block pointer   */
UNSIGNED        free_size;                  /* Size of block found       */
TC_TCB         *task;                       /* Task pointer              */
STATUS          status;                     /* Completion status         */
UNSIGNED        address;                    /* Address of start of block */
UNSIGNED        split_size;                 /* Bytes for front split     */
UNSIGNED        next_aligned;               /* Next aligned block addr   */
NU_SUPERV_USER_VARIABLES

    /* Switch to supervisor mode */
    NU_SUPERVISOR_MODE();

    /* Move input pool pointer into internal pointer.  */
    pool =  (DM_PCB *) pool_ptr;


#ifdef  NU_ENABLE_STACK_CHECK

    /* Call stack checking function to check for an overflow condition.  */
    TCT_Check_Stack();

#endif

#ifdef  NU_ENABLE_HISTORY

    /* Make an entry that corresponds to this function in the system history
       log.  */
    HIC_Make_History_Entry(NU_ALLOCATE_ALIGNED_ID, (UNSIGNED) pool,
                        (UNSIGNED) return_pointer, (UNSIGNED) size);

#endif

    /* Initialize the status as successful.  */
    status =  NU_SUCCESS;

    /* Adjust the request to a size evenly divisible by the number of bytes
       in an UNSIGNED data element.  Also, check to make sure it is of the
       minimum size.  */
    if (size < pool -> dm_min_allocation)

        /* Change size to the minimum allocation.  */
        size =  pool -> dm_min_allocation;
    else

        /* Insure that size is a multiple of the UNSIGNED size.  */
        size =
           ((size + sizeof(UNSIGNED) - 1)/sizeof(UNSIGNED)) * sizeof(UNSIGNED);

    /* Adjust the requested alignment to one evenly divisible by the number of
       bytes in an UNSIGNED data element. */
    alignment =
        ((alignment + sizeof(UNSIGNED) - 1)/sizeof(UNSIGNED)) * sizeof(UNSIGNED);

    /* Protect against simultaneous access to the memory pool.  */
    TCT_Protect(&(pool -> dm_protect));

    /* Search the memory list for the first available block of memory that
       satisfies the request.  Note that blocks are merged during the
       deallocation function.  */
    memory_ptr =  pool -> dm_search_ptr;
    do
    {

        /* Determine if the block is free and if it can satisfy the request. */
        if (memory_ptr -> dm_memory_free)

            /* Calculate the free block size.  */
            free_size =  (((BYTE_PTR) (memory_ptr -> dm_next_memory)) -
                           ((BYTE_PTR) memory_ptr)) - DM_OVERHEAD;
        else

            /* There are no free bytes available.  */
            free_size =  0;

        /* Free block may be large enough, now check alignment */
        if (free_size >= size)
        {
            address = ((UNSIGNED)(memory_ptr)) + DM_OVERHEAD;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
激情综合网最新| 日韩一区二区免费在线电影| 国产精品一区二区在线播放 | 美国精品在线观看| 中文字幕一区二区三区不卡在线| 国产女人18毛片水真多成人如厕| 26uuu另类欧美| 久久久久久久久久久久电影| 久久久精品日韩欧美| 国产网站一区二区| 国产精品天干天干在观线| 久久精品视频免费观看| 欧美韩国日本一区| 自拍偷拍亚洲综合| 亚洲亚洲人成综合网络| 婷婷国产在线综合| 久久99九九99精品| 成人综合在线网站| 91网址在线看| 欧美性猛交xxxx黑人交| 欧美美女一区二区| xvideos.蜜桃一区二区| 中文字幕第一区综合| 亚洲免费在线视频| 丝袜美腿亚洲综合| 狠狠色综合播放一区二区| 丰满岳乱妇一区二区三区| 色综合视频在线观看| 欧美精品日日鲁夜夜添| 精品国产制服丝袜高跟| 国产精品无遮挡| 亚洲最大的成人av| 久久国产尿小便嘘嘘| 高清不卡一区二区| 在线看日本不卡| 欧美刺激午夜性久久久久久久| 久久久噜噜噜久久中文字幕色伊伊| 国产精品传媒在线| 午夜精品久久久久久久99水蜜桃| 黄网站免费久久| 色狠狠桃花综合| 欧美丰满少妇xxxxx高潮对白| 欧美成人一区二区三区片免费| 国产精品剧情在线亚洲| 午夜亚洲国产au精品一区二区 | 制服丝袜亚洲色图| 久久青草国产手机看片福利盒子| 中文字幕欧美一| 爽好久久久欧美精品| 国产成人av资源| 欧美美女一区二区在线观看| 国产欧美日韩在线观看| 日韩精品高清不卡| 99久久99久久精品免费看蜜桃| 欧美久久久久中文字幕| 国产精品电影一区二区| 麻豆成人av在线| 91久久精品一区二区三| 国产日产欧美一区| 天天色综合天天| 91麻豆免费视频| www一区二区| 日本色综合中文字幕| 91亚洲精品一区二区乱码| 26uuu成人网一区二区三区| 亚洲福利视频一区| 成人av一区二区三区| 日韩三级伦理片妻子的秘密按摩| 亚洲男帅同性gay1069| 国产激情91久久精品导航| 88在线观看91蜜桃国自产| 日韩伦理免费电影| 国产美女在线精品| 欧美一区二区三区播放老司机| 有码一区二区三区| 丰满少妇在线播放bd日韩电影| 精品国产一区二区三区忘忧草| 亚洲国产精品视频| 色网站国产精品| 国产精品入口麻豆九色| 国产一区视频导航| 日韩三级高清在线| 日本少妇一区二区| 欧美日韩国产精品成人| 一区二区三区四区激情| 91视频免费播放| 国产精品乱人伦| 国产99久久久国产精品| 精品国产sm最大网站免费看| 久久精品99国产精品| 91.com在线观看| 日韩va欧美va亚洲va久久| 欧美日韩国产首页| 亚洲国产乱码最新视频 | 69堂成人精品免费视频| 一区二区三区日韩| 色中色一区二区| 国产精品麻豆久久久| 成人黄色国产精品网站大全在线免费观看| 精品国产一区二区三区av性色| 免费成人av在线| 欧美成人艳星乳罩| 狠狠色综合播放一区二区| 久久亚洲欧美国产精品乐播| 国产一区二区三区黄视频 | 亚洲一线二线三线久久久| 91久久精品国产91性色tv| 一区二区三区波多野结衣在线观看| 91麻豆福利精品推荐| 亚洲欧美日韩人成在线播放| 91视频国产观看| 亚洲一区二区美女| 欧美精品在欧美一区二区少妇| 日韩影院免费视频| 欧美不卡123| 国产精品亚洲综合一区在线观看| 久久精品人人爽人人爽| 成人免费视频一区| 亚洲人成精品久久久久久| 欧美中文字幕不卡| 免费高清不卡av| 国产偷国产偷亚洲高清人白洁| 高潮精品一区videoshd| 亚洲日本中文字幕区| 欧美日本在线一区| 久久国产精品露脸对白| 欧美激情一区在线| 色天天综合色天天久久| 天堂蜜桃一区二区三区| 2019国产精品| 99久久精品情趣| 香蕉影视欧美成人| 精品欧美乱码久久久久久1区2区| 国产福利电影一区二区三区| 自拍视频在线观看一区二区| 69堂精品视频| 成人美女视频在线观看18| 一片黄亚洲嫩模| 日韩欧美国产一区二区在线播放| 国产剧情一区二区| 一区二区三区不卡在线观看| 欧美电影免费观看高清完整版在线观看| 国产精品一区二区在线看| 亚洲蜜臀av乱码久久精品蜜桃| 7777精品伊人久久久大香线蕉超级流畅| 国内精品写真在线观看| 1024成人网| 日韩美女一区二区三区四区| 成人黄页毛片网站| 无码av中文一区二区三区桃花岛| 国产欧美一区二区精品性色超碰 | 国产午夜久久久久| 日本精品一级二级| 老司机精品视频线观看86| 国产精品国产成人国产三级| 在线播放一区二区三区| 国产成人自拍在线| 日日欢夜夜爽一区| 中文字幕不卡在线| 欧美一区二区女人| av影院午夜一区| 精品在线播放免费| 樱花影视一区二区| 国产精品天美传媒| 欧美电影精品一区二区| 91久久国产最好的精华液| 国产精品123| 奇米精品一区二区三区四区 | 中文成人av在线| 欧美大度的电影原声| 欧美三级在线播放| av毛片久久久久**hd| 国内精品国产成人国产三级粉色| 亚洲午夜av在线| 中文字幕日韩一区二区| 久久久噜噜噜久久中文字幕色伊伊| 欧美亚州韩日在线看免费版国语版 | 免费高清成人在线| 亚洲一区二区三区免费视频| 日本一区二区三区dvd视频在线| 欧美精品高清视频| 色婷婷av一区二区三区大白胸 | 国产日韩av一区二区| 日韩视频免费观看高清完整版在线观看| 色网站国产精品| 91伊人久久大香线蕉| 成人毛片在线观看| 国产成人精品亚洲日本在线桃色| 日本亚洲天堂网| 日一区二区三区| 亚洲一区在线视频观看| 亚洲天堂中文字幕| 中文字幕在线免费不卡| 国产喷白浆一区二区三区| 久久免费午夜影院| 精品成人一区二区三区四区| 91精品国产高清一区二区三区 | 日本一区二区高清| 久久久夜色精品亚洲| 欧美mv日韩mv国产|