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
|
|
|
|
2012-04-06 08:56:52 +02:00
|
|
|
class I2_BASE_API Memory
|
2012-03-28 13:24:49 +02:00
|
|
|
{
|
|
|
|
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 */
|