2014-07-04 16:17:05 -04:00
|
|
|
//
|
|
|
|
|
// Copyright (c) 2008 Advanced Micro Devices, Inc. All rights reserved.
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
#ifndef ALLOC_HPP_
|
|
|
|
|
#define ALLOC_HPP_
|
|
|
|
|
|
|
|
|
|
#include "top.hpp"
|
|
|
|
|
|
|
|
|
|
namespace amd {
|
|
|
|
|
|
2017-04-13 13:56:38 -04:00
|
|
|
class AlignedMemory : public AllStatic {
|
|
|
|
|
public:
|
|
|
|
|
static void* allocate(size_t size, size_t alignment);
|
2014-07-04 16:17:05 -04:00
|
|
|
|
2017-04-13 13:56:38 -04:00
|
|
|
static void deallocate(void* ptr);
|
2014-07-04 16:17:05 -04:00
|
|
|
};
|
|
|
|
|
|
2017-04-13 13:56:38 -04:00
|
|
|
class GuardedMemory : public AllStatic {
|
|
|
|
|
public:
|
|
|
|
|
static void* allocate(size_t size, size_t alignment, size_t guardSize);
|
2014-07-04 16:17:05 -04:00
|
|
|
|
2017-04-13 13:56:38 -04:00
|
|
|
static void deallocate(void* ptr);
|
2014-07-04 16:17:05 -04:00
|
|
|
};
|
|
|
|
|
|
2017-04-13 13:56:38 -04:00
|
|
|
} // namespace amd
|
2014-07-04 16:17:05 -04:00
|
|
|
|
|
|
|
|
#endif /*ALLOC_HPP_*/
|