Skip to content

Commit

Permalink
Add method to return arrayBufferSize
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarred-Sumner committed Dec 24, 2024
1 parent 96c5fda commit 101154e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Source/JavaScriptCore/heap/Heap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,11 @@ size_t Heap::objectCount()
return m_objectSpace.objectCount();
}

size_t Heap::arrayBufferSize()
{
return m_arrayBuffers.size();
}

size_t Heap::extraMemorySize()
{
// FIXME: Change this to use SaturatedArithmetic when available.
Expand Down
1 change: 1 addition & 0 deletions Source/JavaScriptCore/heap/Heap.h
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ class Heap {
JS_EXPORT_PRIVATE size_t protectedGlobalObjectCount();
JS_EXPORT_PRIVATE std::unique_ptr<TypeCountSet> protectedObjectTypeCounts();
JS_EXPORT_PRIVATE std::unique_ptr<TypeCountSet> objectTypeCounts();
JS_EXPORT_PRIVATE size_t arrayBufferSize();

HashSet<MarkedVectorBase*>& markListSet();
void addMarkedJSValueRefArray(MarkedJSValueRefArray*);
Expand Down

0 comments on commit 101154e

Please sign in to comment.