home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Computer Panoráma
/
computer_panorama_1997-12-hibas.iso
/
SHARE
/
GRAPH
/
PTC051.ZIP
/
SRC
/
BLOCK.H
next >
Wrap
C/C++ Source or Header
|
1997-07-24
|
863b
|
60 lines
//////////////////
// Memory block //
//////////////////
#ifndef __BLOCK_H
#define __BLOCK_H
#include "manager.h"
class MemoryBlock
{
// friends
friend MemoryManager;
public:
// setup
MemoryBlock();
MemoryBlock(MemoryManager &manager,uint size,int managed=1);
~MemoryBlock();
// management
int alloc(uint size,int managed);
void free();
// memory access
void* lock();
void unlock();
int count();
// interface
int resize(uint size);
// object status
int ok();
private:
// memory manager
MemoryManager *LocalManager;
// manager block
MemoryManager::BLOCK *Block;
// dummy manager + dummy block?
};
#endif