Skip to content

Commit

Permalink
core/memory: Remove dead code
Browse files Browse the repository at this point in the history
Signed-off-by: Duarte Nunes <[email protected]>
Message-Id: <[email protected]>
  • Loading branch information
duarten authored and avikivity committed Jan 29, 2017
1 parent 9aefd0e commit 6304e98
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions core/memory.hh
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ public:

void set_heap_profiling_enabled(bool);

void* allocate_reclaimable(size_t size);

enum class reclaiming_result {
reclaimed_nothing,
reclaimed_something
Expand Down Expand Up @@ -207,23 +205,4 @@ void* operator new[](size_t size, with_alignment wa);
void operator delete(void* ptr, with_alignment wa);
void operator delete[](void* ptr, with_alignment wa);

template <typename T, size_t Align>
class aligned_allocator {
public:
using value_type = T;
T* allocate(size_t n) const {
// FIXME: multiply can overflow?
return reinterpret_cast<T*>(::operator new(n * sizeof(T), with_alignment(Align)));
}
void deallocate(T* ptr) const {
return ::operator delete(ptr, with_alignment(Align));
}
bool operator==(const aligned_allocator& x) const {
return true;
}
bool operator!=(const aligned_allocator& x) const {
return false;
}
};

#endif /* MEMORY_HH_ */

0 comments on commit 6304e98

Please sign in to comment.