1// Licensed to the .NET Foundation under one or more agreements.
2// The .NET Foundation licenses this file to you under the MIT license.
3// See the LICENSE file in the project root for more information.
4
5
6#ifndef _SYNCCLEAN_HPP_
7#define _SYNCCLEAN_HPP_
8
9// We keep a list of memory blocks to be freed at the end of GC, but before we resume EE.
10// To make this work, we need to make sure that these data are accessed in cooperative GC
11// mode.
12
13class Bucket;
14struct EEHashEntry;
15class Crst;
16class CrstStatic;
17
18class SyncClean {
19public:
20 static void Terminate ();
21
22 static void AddHashMap (Bucket *bucket);
23 static void AddEEHashTable (EEHashEntry** entry);
24 static void CleanUp ();
25
26private:
27 static VolatilePtr<Bucket> m_HashMap; // Cleanup list for HashMap
28 static VolatilePtr<EEHashEntry *> m_EEHashTable; // Cleanup list for EEHashTable
29};
30#endif
31