git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5793 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2011-03-16 20:03:49 +00:00
parent 8dad49156d
commit 09c391fb2d
80 changed files with 391 additions and 365 deletions

View File

@ -1612,21 +1612,25 @@ void *Atom::extract(char *name)
add in global to local mapping storage
------------------------------------------------------------------------- */
double Atom::memory_usage()
bigint Atom::memory_usage()
{
memlength = DELTA_MEMSTR;
memory->create(memstr,memlength,"atom:memstr");
memstr[0] = '\0';
bigint bytes = avec->memory_usage();
memory->destroy(memstr);
double bytes = avec->memory_usage();
if (map_style == 1)
bytes += map_tag_max * sizeof(int);
bytes += memory->usage(map_array,map_tag_max+1);
else if (map_style == 2) {
bytes += map_nbucket*sizeof(int);
bytes += map_nhash*sizeof(HashElem);
}
if (maxnext) {
bytes += memory->usage(next,maxnext);
bytes += memory->usage(permute,maxnext);
}
memory->destroy(memstr);
return bytes;
}