diff options
author | Andreas Kling <kling@serenityos.org> | 2021-05-27 20:07:34 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-27 20:07:34 +0200 |
commit | 14585a9cba82df1359652f69f2fa91303bb49c75 (patch) | |
tree | e13ce96215765ef5ec2bcbd5d5898bdb028dcf87 /Userland/Libraries/LibJS/Heap | |
parent | 606b4832312c659615ce813077844ebe5ac2b4a4 (diff) | |
download | serenity-14585a9cba82df1359652f69f2fa91303bb49c75.zip |
LibJS: Remove unused HeapBlock::operator delete()
Diffstat (limited to 'Userland/Libraries/LibJS/Heap')
-rw-r--r-- | Userland/Libraries/LibJS/Heap/HeapBlock.cpp | 10 | ||||
-rw-r--r-- | Userland/Libraries/LibJS/Heap/HeapBlock.h | 2 |
2 files changed, 0 insertions, 12 deletions
diff --git a/Userland/Libraries/LibJS/Heap/HeapBlock.cpp b/Userland/Libraries/LibJS/Heap/HeapBlock.cpp index 2f270c9160..c2ae0b3470 100644 --- a/Userland/Libraries/LibJS/Heap/HeapBlock.cpp +++ b/Userland/Libraries/LibJS/Heap/HeapBlock.cpp @@ -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) diff --git a/Userland/Libraries/LibJS/Heap/HeapBlock.h b/Userland/Libraries/LibJS/Heap/HeapBlock.h index 3be74c0158..8916747347 100644 --- a/Userland/Libraries/LibJS/Heap/HeapBlock.h +++ b/Userland/Libraries/LibJS/Heap/HeapBlock.h @@ -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; } |