1
1

Changed unpack start pointer (from_ptr) setup.

- Testsuite found as this was set to NULL until a pack to catch invalid unpacks
     that if a realloc occured on the first pack, then all ptrs updated by
     relative amounts and then the from_ptr was not NULL and not set on
	 first pack correctly. Have changed it to the simple method.

This commit was SVN r2098.
Этот коммит содержится в:
Graham Fagg 2004-08-12 23:14:00 +00:00
родитель 959be36a9c
Коммит f4b77b5d60

Просмотреть файл

@ -121,7 +121,7 @@ size_t isize = 0;
bptr->base_ptr = (void*) malloc (isize);
bptr->data_ptr = bptr->base_ptr; /* set the start of the buffer */
/* leave from_ptr NULL so we catch an unpack before pack! */
bptr->from_ptr = bptr->base_ptr; /* set the unpack start at start */
/* set counts for size and space */
bptr->size = bptr->space = isize;
@ -366,9 +366,6 @@ return (OMPI_SUCCESS);
bptr->space -= op_size;
/* if first pack also set the from_ptr as it is now valid */
if (!bptr->from_ptr) bptr->from_ptr = bptr->base_ptr;
return OMPI_SUCCESS;
}