8233380: CHT: Node allocation and freeing

Reviewed-by: rehn, tschatzl
This commit is contained in:
Ivan Walulya 2021-05-19 08:01:35 +00:00
parent 2563a6a9b5
commit 70f6c67051
7 changed files with 76 additions and 60 deletions

View file

@ -122,11 +122,11 @@ class StringTableConfig : public StackObj {
return 0;
}
// We use default allocation/deallocation but counted
static void* allocate_node(size_t size, Value const& value) {
static void* allocate_node(void* context, size_t size, Value const& value) {
StringTable::item_added();
return AllocateHeap(size, mtSymbol);
}
static void free_node(void* memory, Value const& value) {
static void free_node(void* context, void* memory, Value const& value) {
value.release(StringTable::_oop_storage);
FreeHeap(memory);
StringTable::item_removed();