[omniORB] string_dup() behavior

Duncan Grisby duncan@grisby.org
Mon Jul 15 10:38:01 2002


On Friday 12 July, baileyk@schneider.com wrote:

> I think if you were to make all of the static functions in
> _CORBA_String_helper non-inline, the problem would go away.  I'm somewhat
> disturbed that they are inline.  I believe the need for these CORBA
> specific memory allocators is precisely to work around this problem.  By
> making them inline it defeats the purpose.  All ORB related memory
> allocations should be done from within the ORB DLLs in order for the very
> existence of the CORBA::string_* functions to make sense.

The string allocation functions are inline for speed. The only
platform we've ever encountered that has a non-uniform memory
architecture is Windows. I believe (although I might be wrong) that
there are other very good reasons that debug/threading etc. modes must
be matched between all application code and DLLs on Windows. If this
really is the case, it's a good thing to keep the string allocators
inline, since it causes pretty much all Windows programs to break very
quickly if they have the wrong settings. The other issues are probably
more sneaky.

If a Windows guru can assure us that the only reason the application
compile setting have to match the DLL settings is the inline string
allocation, it will be worth getting rid of the inline functions on
Windows.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan@grisby.org     --
   -- http://www.grisby.org --