mem

类别:编程语言 点击:0 评论:0 推荐:

#include "MemManagement.h"

MemMangement::MemMangement(int numOfKB){
    this->numOfKB = numOfKB;
    this->m_storage = new unsigned char[this->numOfKB * 1024];
    if (NULL == this->m_storage){
        exit(1);
    }
}

status MemMangement::memAlloc(size){
    this->m_sizeofAlloc = size;

}

#ifndef MEM_MANAGEMENT
#define MEM_MANAGEMENT

const int MemBlock = 64;
typedef int status;

class MemManagement{
    public:
        MemManagement(int numofKB = MemBlock);
        ~MemManagement();
       
        status MemAlloc(size);
        status MemFree();
        setFlag();
    private:
        int m_numOfKB;
        int m_sizeOfAlloc;
        unsigned char* m_storage;
   
}

 

#endif MEM_MANAGEMENT

本文地址:http://com.8s8s.com/it/it25941.htm