My apologies - I intended to address this solely to George and missed that
it replied to the list. Too early in the morning...


On 7/20/07 5:32 AM, "Ralph Castain" <r...@lanl.gov> wrote:

> I guess I really don't understand this change. How is it better that I
> *always* malloc a buffer that I might never use, just so I can *always*
> release it - versus *only* malloc'ing and releasing a buffer when I know I
> need it??
> 
> I don't really care, but this seems kinda wasteful and I would like to
> understand the benefit.
> 
> Thanks
> Ralph
> 
> 
> 
> On 7/19/07 10:06 PM, "bosi...@osl.iu.edu" <bosi...@osl.iu.edu> wrote:
> 
>> Author: bosilca
>> Date: 2007-07-20 00:06:39 EDT (Fri, 20 Jul 2007)
>> New Revision: 15533
>> URL: https://svn.open-mpi.org/trac/ompi/changeset/15533
>> 
>> Log:
>> Always release the buffer (this imply the buffer has to be created
>> outside the special case).
>> 
>> Text files modified:
>>    trunk/orte/orted/orted_main.c |     6 ++++--
>>    1 files changed, 4 insertions(+), 2 deletions(-)
>> 
>> Modified: trunk/orte/orted/orted_main.c
>> 
=============================================================================>>
=
>> --- trunk/orte/orted/orted_main.c (original)
>> +++ trunk/orte/orted/orted_main.c 2007-07-20 00:06:39 EDT (Fri, 20 Jul 2007)
>> @@ -391,8 +391,8 @@
>>      }
>>      
>>      /* if we are not a seed, prep a return buffer to say we started okay */
>> +    buffer = OBJ_NEW(orte_buffer_t);
>>      if (!orte_process_info.seed) {
>> -        buffer = OBJ_NEW(orte_buffer_t);
>>          if (ORTE_SUCCESS != (ret = orte_dss.pack(buffer, &zero, 1,
>> ORTE_INT))) {
>>              ORTE_ERROR_LOG(ret);
>>              OBJ_RELEASE(buffer);
>> @@ -459,6 +459,7 @@
>>          if (ORTE_SUCCESS != (ret = orte_ns.get_jobid_string(&jobidstring,
>>                                          orte_process_info.my_name))) {
>>              ORTE_ERROR_LOG(ret);
>> +            OBJ_RELEASE(buffer);
>>              return ret;
>>          }
>>  
>> @@ -509,6 +510,7 @@
>>                                    ORTE_RML_NON_PERSISTENT,
>> orte_daemon_recv_gate, NULL);
>>      if (ret != ORTE_SUCCESS && ret != ORTE_ERR_NOT_IMPLEMENTED) {
>>          ORTE_ERROR_LOG(ret);
>> +        OBJ_RELEASE(buffer);
>>          return ret;
>>      }
>>  
>> @@ -547,8 +549,8 @@
>>              OBJ_RELEASE(buffer);
>>              return ret;
>>          }
>> -        OBJ_RELEASE(buffer);  /* done with this */
>>      }
>> +    OBJ_RELEASE(buffer);  /* done with this */
>>  
>>      if (orte_debug_daemons_flag) {
>>          opal_output(0, "%s orted: up and running - waiting for commands!",
>> ORTE_NAME_PRINT(orte_process_info.my_name));
>> _______________________________________________
>> svn mailing list
>> s...@open-mpi.org
>> http://www.open-mpi.org/mailman/listinfo.cgi/svn


Reply via email to