mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 05:48:12 +00:00
LibJS: Remove unused HeapBlock::operator delete()
This commit is contained in:
parent
606b483231
commit
14585a9cba
2 changed files with 0 additions and 12 deletions
|
@ -22,16 +22,6 @@ NonnullOwnPtr<HeapBlock> HeapBlock::create_with_cell_size(Heap& heap, size_t cel
|
|||
return NonnullOwnPtr<HeapBlock>(NonnullOwnPtr<HeapBlock>::Adopt, *block);
|
||||
}
|
||||
|
||||
void HeapBlock::operator delete(void* ptr)
|
||||
{
|
||||
#ifdef __serenity__
|
||||
int rc = munmap(ptr, block_size);
|
||||
VERIFY(rc == 0);
|
||||
#else
|
||||
free(ptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
HeapBlock::HeapBlock(Heap& heap, size_t cell_size)
|
||||
: m_heap(heap)
|
||||
, m_cell_size(cell_size)
|
||||
|
|
|
@ -21,8 +21,6 @@ public:
|
|||
static constexpr size_t block_size = 16 * KiB;
|
||||
static NonnullOwnPtr<HeapBlock> create_with_cell_size(Heap&, size_t);
|
||||
|
||||
void operator delete(void*);
|
||||
|
||||
size_t cell_size() const { return m_cell_size; }
|
||||
size_t cell_count() const { return (block_size - sizeof(HeapBlock)) / m_cell_size; }
|
||||
bool is_full() const { return !has_lazy_freelist() && !m_freelist; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue