mirror of
https://bitbucket.org/seefoe/dockerized-swg-src.git
synced 2026-07-31 01:15:48 -04:00
31 lines
405 B
C++
31 lines
405 B
C++
#if !defined (BLOCKALLOCATOR_H_)
|
|
#define BLOCKALLOCATOR_H_
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
#ifdef EXTERNAL_DISTRO
|
|
namespace NAMESPACE
|
|
{
|
|
|
|
#endif
|
|
namespace Base
|
|
{
|
|
class BlockAllocator
|
|
{
|
|
public:
|
|
BlockAllocator();
|
|
~BlockAllocator();
|
|
void *getBlock(unsigned accum);
|
|
void returnBlock(unsigned *handle);
|
|
|
|
private:
|
|
unsigned *m_blocks[31];
|
|
};
|
|
};
|
|
#ifdef EXTERNAL_DISTRO
|
|
};
|
|
#endif
|
|
|
|
#endif
|