44#ifndef G4EnhancedVecAllocator_h
45#define G4EnhancedVecAllocator_h 1
84 template<
typename _Tp1>
90 : std::allocator<_Tp>() {;}
92 template<
typename _Tp1>
94 : std::allocator<_Tp>() {;}
102 _Tp*
allocate(
size_t _Count,
void *
const hint = 0);
116template<
typename _Tp>
148template<
typename _Tp>
151template<
typename _Tp>
155 size_t totalsize = _Count *
sizeof(_Tp);
200 char *newSpace1 = (
char *) malloc(totalsize * 512);
205 for (
register int k = 0; k < 512 ; k++)
209 newSpace1+totalsize*k;
239 char *newSpace = (
char *) malloc(totalsize * 512);
244 for (
register int k = 0; k < 512 ; k++)
247 preAllocated[originalchunknumber + k]).
isAllocated= 0;
249 preAllocated[originalchunknumber + k]).address= newSpace+totalsize*k;
256 preAllocated[originalchunknumber]).address);
263template<
typename _T1,
typename _T2>
272template<
typename _T1,
typename _T2>
bool operator==(const G4EnhancedVecAllocator< _T1 > &, const G4EnhancedVecAllocator< _T2 > &)
bool operator!=(const G4EnhancedVecAllocator< _T1 > &, const G4EnhancedVecAllocator< _T2 > &)
static G4ChunkIndexType * allocStat
_Tp * allocate(size_t _Count)
void deallocate(_Tp *_Ptr, size_t _Count)
~G4EnhancedVecAllocator()
G4EnhancedVecAllocator(const G4EnhancedVecAllocator< _Tp > &)
G4EnhancedVecAllocator(const G4EnhancedVecAllocator< _Tp1 > &)
G4ChunkType * preAllocated
G4EnhancedVecAllocator< _Tp1 > other