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

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

?? hmem.cxx

?? EFI(Extensible Firmware Interface)是下一代BIOS
?? CXX
字號:
/*++

Copyright (c) 1991-1999 Microsoft Corporation

Module Name:

    hmem.cxx

--*/

#include <pch.cxx>

#define _ULIB_MEMBER_
#include "ulib.hxx"
#include "error.hxx"
#include "hmem.hxx"


DEFINE_EXPORTED_CONSTRUCTOR( HMEM, MEM, ULIB_EXPORT );

VOID
HMEM::Construct (
    )
/*++

Routine Description:

    The is the contructor of HMEM.  It initializes the private data
    to reasonable default values.

Arguments:

    None.

Return Value:

    None.

--*/
{
    _size = 0;
    _real_buf = NULL;
    _buf = NULL;
}


ULIB_EXPORT
HMEM::~HMEM(
    )
/*++

Routine Description:

    Destructor for HMEM.  Frees up any memory used.

Arguments:

    None.

Return Value:

    None.

--*/
{
    Destroy();
}


ULIB_EXPORT
BOOLEAN
HMEM::Initialize(
    )
/*++

Routine Description:

    This routine initializes HMEM to an initial state.  All pointers or
    information previously aquired from this object will become invalid.

Arguments:

    None.

Return Value:

    FALSE   - Failure.
    TRUE    - Success.

--*/
{
    Destroy();

    return TRUE;
}


ULIB_EXPORT
PVOID
HMEM::Acquire(
    IN  ULONG   Size,
    IN  ULONG   AlignmentMask
    )
/*++

Routine Description:

    This routine acquires the memory resources of this object for
    the client to use.  'Size' bytes of data are guaranteed by
    this routine or this routine will return NULL.  After one call
    of 'Acquire' has succeeded, all subsequent calls will return the
    same memory, provided that the Size requested is within bounds
    specified in the first successful call.  The first successful call
    will dictate the size and location of the memory which will be
    available by calls to 'QuerySize' and 'GetBuf' respectively.

    A call to Initialize will invalidate all memory previously granted
    by this object and enable the next call to Acquire to specify
    any size.

Arguments:

    Size            - The number of bytes of memory expected.
    AlignmentMask   - Supplies the alignment required on the memory.

Return Value:

    A valid pointer to 'Size' bytes of memory or NULL.

--*/
{
    if (_buf) {
        if (Size <= _size && !(((ULONG_PTR) _buf)&AlignmentMask)) {
            return _buf;
        } else {
            return NULL;
        }
    }

    _size = Size;

    if (!(_real_buf = MALLOC((UINT) (_size + AlignmentMask)))) {
        return NULL;
    }

    _buf = (PVOID) ((ULONG_PTR) ((PCHAR) _real_buf + AlignmentMask) &
                            (~(ULONG_PTR)AlignmentMask));

    return _buf;
}


ULIB_EXPORT
BOOLEAN
HMEM::Resize(
    IN  ULONG   NewSize,
    IN  ULONG   AlignmentMask
    )
/*++

Routine Description:

    This method reallocates the object's buffer to a larger
    chunk of memory.

Arguments:

    NewSize         -- supplies the new size of the buffer.
    AlignmentMask   -- supplies the alignment requirements on the memory.

Return Value:

    TRUE upon successful completion.

Notes:

    This method allocates a new buffer, copies the appropriate
    amount of data to it, and then frees the old buffer.  Clients
    who use Resize must avoid caching pointers to the memory, but
    must use GetBuf to find out where the memory is.

    If NewSize is smaller than the current buffer size, we keep
    the current buffer.

    If this method fails, the object is left unchanged.

--*/
{
    PVOID NewBuffer;
    PVOID NewRealBuffer;

    // First, check to see if our current buffer is big enough
    // and has the correct alignment
    // to satisfy the client.

    if( _buf &&
        NewSize <= _size &&
        !(((ULONG_PTR) _buf)&AlignmentMask)) {

            return TRUE;
    }

    // We need to allocate a new chunk of memory.

    if( (NewRealBuffer = MALLOC((UINT) (NewSize + AlignmentMask))) == NULL ) {

        return FALSE;
    }

    NewBuffer = (PVOID) ((ULONG_PTR) ((PCHAR) NewRealBuffer + AlignmentMask) &
                                 (~(ULONG_PTR)AlignmentMask));

    // Copy data from the old buffer to the new.  Since we know
    // that NewSize is greater than _size, we copy _size bytes.

    memset( NewBuffer, 0, (UINT) NewSize );
    memcpy( NewBuffer, _buf, (UINT) min(_size, NewSize) );

    // Free the old buffer and set the object's private variables.

    FREE( _real_buf );
    _real_buf = NewRealBuffer;
    _buf = NewBuffer;
    _size = NewSize;

    return TRUE;
}


VOID
HMEM::Destroy(
    )
/*++

Routine Description:

    This routine frees the memory of a previous call to Acquire thus
    invalidating all pointers to that memory and enabling future
    Acquires to succeed.

Arguments:

    None.

Return Value:

    None.

--*/
{
    _size = 0;
    if (_real_buf) {
        FREE(_real_buf);
        _real_buf = NULL;
    }
    _buf = NULL;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
97精品久久久久中文字幕 | 成人精品免费网站| 国产精品久久久久影院老司| 色婷婷国产精品综合在线观看| 视频精品一区二区| 欧美精品第一页| 国产不卡视频一区二区三区| 亚洲gay无套男同| 欧美日韩成人综合在线一区二区 | 亚洲一区二区三区不卡国产欧美| 欧美亚洲禁片免费| 免费成人性网站| 中文字幕亚洲精品在线观看| 宅男在线国产精品| jvid福利写真一区二区三区| 免费av成人在线| 国产精品美女久久久久久久网站| 337p亚洲精品色噜噜噜| 成人免费视频免费观看| 久久精品国产亚洲高清剧情介绍| 亚洲视频1区2区| 欧美日韩国产乱码电影| 欧美日韩黄色一区二区| 国产美女娇喘av呻吟久久| 亚洲成人动漫在线免费观看| 国产精品欧美经典| 日韩欧美亚洲国产另类 | 国产999精品久久久久久| 久久er99热精品一区二区| 日韩av成人高清| 日日夜夜免费精品| 日韩av午夜在线观看| 偷偷要91色婷婷| 日日夜夜精品免费视频| 天天av天天翘天天综合网色鬼国产| 一区二区三区鲁丝不卡| 亚洲自拍偷拍图区| 亚洲影视在线观看| 午夜av电影一区| 免费成人av在线播放| 激情另类小说区图片区视频区| 久久精品72免费观看| 极品少妇xxxx偷拍精品少妇| 六月丁香婷婷久久| 国产在线精品视频| 懂色一区二区三区免费观看| 成人av在线资源网| 91黄色小视频| 欧美日韩国产片| 欧美videos大乳护士334| 欧美www视频| 国产亚洲视频系列| 国产精品高清亚洲| 亚洲最新视频在线播放| 亚洲高清一区二区三区| 免费人成黄页网站在线一区二区| 久久精品国产免费| 粉嫩嫩av羞羞动漫久久久 | 欧美疯狂做受xxxx富婆| 日韩欧美中文字幕公布| 国产亚洲欧美激情| 亚洲欧美激情一区二区| 视频一区中文字幕| 蜜臀av亚洲一区中文字幕| 国产精品一区免费视频| 色综合天天综合网国产成人综合天 | 久久久久国产一区二区三区四区| 亚洲www啪成人一区二区麻豆 | 91美女片黄在线观看| 欧美四级电影网| 欧美成人欧美edvon| 欧美国产日产图区| 亚洲图片自拍偷拍| 国产真实乱对白精彩久久| 不卡一卡二卡三乱码免费网站| 欧美在线播放高清精品| 日韩欧美国产综合一区| 国产精品理论片在线观看| 亚洲一区二区三区视频在线播放| 六月丁香综合在线视频| 91亚洲精品一区二区乱码| 欧美精品一级二级| 中文一区在线播放| 日韩成人一级大片| 成人午夜精品在线| 欧美一区二区三区婷婷月色| 中文字幕在线观看一区| 日韩精品国产精品| 99久久99久久久精品齐齐| 欧美一区二区三区在线看| 国产精品久线观看视频| 久久成人免费电影| 欧美三电影在线| 中文字幕国产精品一区二区| 免费一区二区视频| 色偷偷久久人人79超碰人人澡| 久久网站热最新地址| 午夜久久久影院| eeuss国产一区二区三区| 26uuu精品一区二区三区四区在线| 一区二区三区国产精华| 国产白丝精品91爽爽久久| 日韩欧美黄色影院| 亚洲国产日韩在线一区模特| 不卡高清视频专区| 久久精品这里都是精品| 日本va欧美va精品| 欧美性欧美巨大黑白大战| 亚洲少妇最新在线视频| 欧美色大人视频| 欧美精品久久天天躁| 精品国产123| 亚洲国产欧美在线人成| www.日本不卡| 国产精品污网站| 免费看欧美女人艹b| 欧美无乱码久久久免费午夜一区| 一区免费观看视频| 国产91精品在线观看| 精品91自产拍在线观看一区| 日韩不卡在线观看日韩不卡视频| 欧美又粗又大又爽| 亚洲精品国产a| 91久久久免费一区二区| 中文字幕字幕中文在线中不卡视频| 国产精品1区2区| 久久九九影视网| 国产精品亚洲成人| 国产欧美一区在线| 成人综合日日夜夜| 久久免费的精品国产v∧| 国产一区二区三区美女| 欧美岛国在线观看| 91香蕉视频污在线| 中文字幕一区二区三区蜜月 | 国产成人av电影在线观看| 久久中文娱乐网| 国产一区二区不卡| 国产亚洲制服色| 成人一区二区三区在线观看 | 国产精品情趣视频| 成人深夜视频在线观看| 成人免费在线观看入口| 色狠狠综合天天综合综合| 一区二区三区精密机械公司| 在线观看区一区二| 日韩中文字幕av电影| 日韩一级欧美一级| 久久99精品久久久久| 国产亚洲精品福利| av在线不卡电影| 亚洲男人电影天堂| 欧美色爱综合网| 美女一区二区视频| 国产女主播视频一区二区| 99在线热播精品免费| 亚洲在线免费播放| 91精品国产入口在线| 激情综合色播激情啊| 中文字幕的久久| 欧美日韩在线播放三区| 精品一二三四在线| 国产精品免费视频网站| 欧美在线看片a免费观看| 免费不卡在线观看| 亚洲欧美在线视频| 欧美日韩成人综合天天影院| 国产真实乱子伦精品视频| 亚洲欧美激情小说另类| 欧美放荡的少妇| 国产成人免费xxxxxxxx| 亚洲蜜臀av乱码久久精品蜜桃| 91精品国产色综合久久| 成av人片一区二区| 视频在线观看一区二区三区| 国产三级三级三级精品8ⅰ区| 色婷婷精品大在线视频| 精品在线播放午夜| 亚洲综合在线电影| 久久精品亚洲国产奇米99| 欧美探花视频资源| 国产凹凸在线观看一区二区| 香港成人在线视频| 中文字幕国产一区| 欧美一区国产二区| 99精品视频一区二区| 不卡在线观看av| 麻豆一区二区在线| 一区二区三区中文免费| 国产亚洲一二三区| 欧美一区二区在线看| 色哟哟国产精品免费观看| 国产真实精品久久二三区| 偷窥国产亚洲免费视频| 中文字幕一区二区三区av| 精品少妇一区二区三区在线视频 | 欧美三级日韩在线| 成人爽a毛片一区二区免费| 美女视频黄 久久| 亚洲一级二级三级在线免费观看|