<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>10087</bug_id>
          
          <creation_ts>2016-08-04 20:43:51 +0000</creation_ts>
          <short_desc>RMC: RMC Project - reduce memory copying</short_desc>
          <delta_ts>2017-05-22 16:55:09 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BSPs</product>
          <component>bsps-meta-intel</component>
          <version>2.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>OBSOLETE</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Low</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.4</target_milestone>
          <dependson>10086</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jianxun Zhang">jianxun.zhang</reporter>
          <assigned_to name="Ng, Wei Tee">wei.tee.ng</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>rebecca.swee.fun.chang</cc>
    
    <cc>sgw</cc>
    
    <cc>todor.minchev</cc>
    
    <cc>tom.zanussi</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>64913</commentid>
    <comment_count>0</comment_count>
    <who name="Jianxun Zhang">jianxun.zhang</who>
    <bug_when>2016-08-04 20:43:51 +0000</bug_when>
    <thetext>Sometimes what a RMC client wants is just fetch a file blob and treat content as a string. But in this case a client has to re-alloc memory to add a &apos;\0&apos; at the end of string.

I think RMC library can always alloc one extra byte of true length of file blob, and always set &apos;\0&apos; in the last byte. The true length of file blob will be still returned without +1 to be compatible for other scenarios.

With this trick, clients won&apos;t need to copy the content when they only want to read string.

Freeing memory allocated by RMC API shouldn&apos;t be affected since free functions don&apos;t take length.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67804</commentid>
    <comment_count>1</comment_count>
    <who name="Jianxun Zhang">jianxun.zhang</who>
    <bug_when>2016-10-31 20:05:57 +0000</bug_when>
    <thetext>This task depends on the major change tracked in 10086.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71451</commentid>
    <comment_count>2</comment_count>
    <who name="Todor Minchev">todor.minchev</who>
    <bug_when>2017-03-20 16:29:01 +0000</bug_when>
    <thetext>Performance can be also improved in write_fingerprint_file (src/rmc.c). Please see the TODO comment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73413</commentid>
    <comment_count>3</comment_count>
    <who name="Todor Minchev">todor.minchev</who>
    <bug_when>2017-05-22 16:55:09 +0000</bug_when>
    <thetext>Does not apply to RMC2.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>