2012-04-02 08:56:30 +02:00
|
|
|
#ifndef MEMORY_H
|
|
|
|
#define MEMORY_H
|
2012-03-28 13:24:49 +02:00
|
|
|
|
|
|
|
namespace icinga
|
|
|
|
{
|
|
|
|
|
2012-04-03 13:01:00 +02:00
|
|
|
DEFINE_EXCEPTION_CLASS(OutOfMemoryException);
|
2012-03-28 13:24:49 +02:00
|
|
|
|
|
|
|
class Memory
|
|
|
|
{
|
|
|
|
private:
|
2012-04-03 13:01:00 +02:00
|
|
|
Memory(void);
|
2012-03-28 13:24:49 +02:00
|
|
|
|
|
|
|
public:
|
|
|
|
static void *Allocate(size_t size);
|
|
|
|
static void *Reallocate(void *ptr, size_t size);
|
2012-04-03 13:01:00 +02:00
|
|
|
static char *StrDup(const char *str);
|
2012-03-28 13:24:49 +02:00
|
|
|
static void Free(void *ptr);
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2012-04-02 08:56:30 +02:00
|
|
|
#endif /* MEMORY_H */
|