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

This commit is contained in:
sjplimp
2011-12-01 17:21:19 +00:00
parent 57a20c2706
commit 8c372f6c41
18 changed files with 271 additions and 169 deletions

View File

@ -32,7 +32,12 @@ void *Memory::smalloc(bigint nbytes, const char *name)
{
if (nbytes == 0) return NULL;
#if defined(LAMMPS_MEMALIGN)
void *ptr;
posix_memalign(&ptr, LAMMPS_MEMALIGN, nbytes);
#else
void *ptr = malloc(nbytes);
#endif
if (ptr == NULL) {
char str[128];
sprintf(str,"Failed to allocate " BIGINT_FORMAT " bytes for array %s",