Import Geant4 10.7.0 source tree

This commit is contained in:
Gabriele Cosmo
2020-12-04 12:30:43 +01:00
parent 67ba86d073
commit dab42d2018
3770 changed files with 226369 additions and 286486 deletions
+4 -4
View File
@@ -25,22 +25,22 @@ inline void cmem_free(T*& a_p){
template <class T>
inline T* cmem_alloc(size_t a_num){
if(a_num<=0) return 0;
T* p = (T*)::malloc(a_num*sizeof(T));
T* p = (T*)::malloc(a_num*sizeof(T));
if(!p) return 0;
#ifdef TOOLS_MEM
mem::increment("cmem");
#endif
#endif
return p;
}
template <class T>
inline T* cmem_alloc_copy(const T* a_from,size_t a_num){
if(a_num<=0) return 0;
T* p = (T*)::malloc(a_num*sizeof(T));
T* p = (T*)::malloc(a_num*sizeof(T));
if(!p) return 0;
#ifdef TOOLS_MEM
mem::increment("cmem");
#endif
#endif
//::memcpy(p,a_from,a_num*sizeof(T));
for(size_t i=0;i<a_num;i++) p[i] = a_from[i];
return p;