44 #ifndef G4EnhancedVecAllocator_h
45 #define G4EnhancedVecAllocator_h 1
79 template<
typename _Tp>
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);
116 template<
typename _Tp>
148 template<
typename _Tp>
151 template<
typename _Tp>
155 size_t totalsize = _Count *
sizeof(_Tp);
170 G4AllocStats::numCat++;
188 found = G4AllocStats::numCat - 1;
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);
263 template<
typename _T1,
typename _T2>
272 template<
typename _T1,
typename _T2>