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.
7 #ifndef __objectlist_h__
8 #define __objectlist_h__
11 #include "arraylist.h"
14 #define INVALID_COMPRESSEDSTACK_INDEX ((DWORD)-1)
16 #define FREE_LIST_SIZE 128
18 #define FREE_LIST_SIZE 1024
28 friend class ObjectList;
31 ArrayList::Iterator _iter;
37 LIMITED_METHOD_CONTRACT;
38 PTR_VOID ptr = _iter.GetElement();
39 if (((DWORD)(size_t)(dac_cast<TADDR>(ptr)) & 0x1) == 0)
51 LIMITED_METHOD_CONTRACT;
52 return _iter.GetIndex();
57 LIMITED_METHOD_CONTRACT;
62 ObjectList() DAC_EMPTY();
64 DWORD AddToList( PVOID ptr );
65 void RemoveFromList( PVOID ptr );
66 void RemoveFromList( DWORD index, PVOID ptr );
67 PVOID Get( DWORD index );
69 ObjectList::Iterator Iterate()
71 LIMITED_METHOD_CONTRACT;
72 ObjectList::Iterator i;
73 i._iter = this->allEntries_.Iterate();
78 ArrayList allEntries_;
83 class UnsynchronizedBlockAllocator
86 UnsynchronizedBlockAllocator( size_t blockSize );
87 ~UnsynchronizedBlockAllocator( void );
89 PVOID Allocate( size_t size );
100 #endif // __objectlist_h__