[hxprotocol] CR-Client: Configureable inline for size reduction

[hxprotocol] CR-Client: Configureable inline for size reduction

Jamie Gordon jgordon at real.com
Thu Sep 25 12:16:01 PDT 2003


Are these methods used outside the cpp files they are defined in?

If so, they will not be properly inlined for those uses and I
believe will fail to build on some platforms. If they need to be
used elsewhere, they need to be defined in the header. In which
case I would suggest using an INIT_GUID like syntax for conditionally
defining them in the NOINLINE case, such as

#ifdef HELIX_FEATURE_NOINLINE
#define HX_INLINE
#else
#define _DEFINE_INLINE
#define HX_INLINE inline
#endif

....

#ifdef _DEFINE_INLINE
HX_INLINE UINT8*
SDESItem::pack(UINT8* buf, UINT32 &len)
{
     /* ... */
}

Then in the cpp file that should define it, something like

#define _DEFINE_INLINE
#include rtppkt.h


Henry Ping wrote:
> looks good, I prefer HELIX_FEATURE_NOINLINE since we can use the same 
> define to disable inline at other places.
> 
> -->Henry
> 
> At 11:05 AM 9/25/2003 -0700, Chris Sloan wrote:
> 
>> Synopsis:
>> Reduce the size of builds by removing inline functions configurable by
>> a helix feature
>>
>> Overview:
>> I use "#define inline" in .cpp files that contain inline
>> implementations of member functions.  For header files, I do the same
>> and the reverse at the bottom "define inline inline".  I wrap the 
>> #define in a helix
>> feature so it will be configurable at compile time (by default these
>> modules build inline).  This change saves a little more than 6k in
>> symbian thumb builds of the core.
>>
>> I called the helix feature HELIX_FEATURE_NOINLINE_PACKETS, obviously
>> not a good name so I'm taking suggestions.
>>
>> Files Modified:
>> protocol/transport/rdt/tngpkt.h - turned off inline for all
>> functions
>>
>> transport/rtp/pub/rtppkt.h - moved configurable inline functions to
>> a new module, rtppkt.cpp.
>>
>> transport/rtp/pub/rtpwrap.h - moved configurable inline functions to
>> a new module, rtpwrap.cpp.
>>
>> transport/rtp/Umakefil - added new cpp modules
>>
>> helix-client-mobile1.pf - add the helix feature to remove inline
>> definition
>>
>> Image Size and Heap Use impact:
>> image size reduced by 6k no heap change
>>
>> Platforms and Profiles Affected:
>> all using mobile1 profile
>>
>> Platforms and Profiles Build Verified:
>> win32 and symbian
>>
>> Platforms and Profiles Functionality verified:
>> win32 helix-client-all-defines
>>
>> Branch:
>> head
>>
>> -- 
>> Best regards,
>>  Chris                          mailto:csloan at real.com
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe at protocol.helixcommunity.org
> For additional commands, e-mail: dev-help at protocol.helixcommunity.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe at protocol.helixcommunity.org
For additional commands, e-mail: dev-help at protocol.helixcommunity.org




More information about the Protocol-dev mailing list
 

Site Map   |   Terms of Use   |   Privacy Policy   |   Contact Us

Copyright © 1995-2007 RealNetworks, Inc. All rights reserved. RealNetworks and Helix are trademarks of RealNetworks.
All other trademarks or registered trademarks are the property of their respective holders.