mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 01:54:47 +02:00
8180048: Interned string and symbol table leak memory during parallel unlinking
Make appending found dead BasicHashtableEntrys to the free list atomic. Reviewed-by: ehelin, shade, coleenp
This commit is contained in:
parent
8e28d5772d
commit
c775f6f58b
7 changed files with 97 additions and 29 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -154,8 +154,11 @@ private:
|
|||
|
||||
static volatile int _parallel_claimed_idx;
|
||||
|
||||
// Release any dead symbols
|
||||
static void buckets_unlink(int start_idx, int end_idx, int* processed, int* removed);
|
||||
typedef SymbolTable::BucketUnlinkContext BucketUnlinkContext;
|
||||
// Release any dead symbols. Unlinked bucket entries are collected in the given
|
||||
// context to be freed later.
|
||||
// This allows multiple threads to work on the table at once.
|
||||
static void buckets_unlink(int start_idx, int end_idx, BucketUnlinkContext* context);
|
||||
public:
|
||||
enum {
|
||||
symbol_alloc_batch_size = 8,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue