Go to the source code of this file.
void CLEAR_ELEM | ( | void * | ptr, | |
int | size | |||
) | [inline] |
void freeplacemon | ( | ) |
Definition at line 697 of file placemon.cc.
void INIT_ELEM | ( | void * | ptr, | |
int | size | |||
) | [inline] |
void MAC_REV_FREE | ( | void * | ptr, | |
int | size | |||
) | [inline] |
void* MAC_REV_MALLOC | ( | int | size | ) | [inline] |
void* MAC_REV_REALLOC | ( | void * | ptr, | |
int | size, | |||
int | newsize | |||
) | [inline] |
Definition at line 49 of file memory.cc.
Referenced by freeint2mon(), and putmon2().
00050 { 00051 void *res=ptr; 00052 if(size<newsize) 00053 { 00054 res=realloc(ptr,newsize); 00055 INIT_ELEM<T>((char*)res+size,newsize-size); 00056 } 00057 if(size>newsize) 00058 { 00059 CLEAR_ELEM<T>((char*)ptr+newsize,size-newsize); 00060 res=realloc(ptr,newsize); 00061 } 00062 return res; 00063 }
void sweep | ( | typdump & | dump, | |
Base & | b | |||
) | [inline] |
Definition at line 164 of file memory.cc.
References Base< predicat >::begin(), and Base< predicat >::end().
Referenced by main().
00169 { 00170 typedef typename typdump::value_type::pol_t::coeff_t coeff; 00171 typedef typename Base::mon mon; 00172 for(typename typdump::iterator iter=dump.begin() 00173 ;iter!=dump.end();iter++) 00174 { 00175 for(int i=0;i<(iter->size);i++) { 00176 MAC_REV_FREE<coeff>(iter->nf[i].nf,iter->nf[i].size*sizeof(coeff)); 00177 #ifdef sparse 00178 MAC_REV_FREE<int>(iter->nf[i].nfind,iter->nf[i].size*sizeof(int)); 00179 #endif 00180 } 00181 MAC_REV_FREE<pol<mon,coeff> >(iter->nf,iter->size*sizeof(pol<mon,coeff>)); 00182 } 00183 for(typename Base::iterator iter=b.begin() 00184 ;iter!=b.end();iter++) 00185 { 00186 MAC_REV_FREE<mon>(iter->accept,iter->taille1*sizeof(mon)); 00187 MAC_REV_FREE<mon>(iter->refuse,iter->taille2*sizeof(mon)); 00188 } 00189 //freeplacemon(); 00190 00191 }