[Gc] inclusion of windows.h
jim.marshall at wbemsolutions.com
Mon Jul 9 16:36:51 PDT 2007
Boehm, Hans wrote:
> But I guess I don't understand Windows conventions well enough to be
> convinced that either of these are an improvement.
> With (1), won't this be a problem if the file incluing gc.h later needs
> a full version of windows.h?
> With (2), can't you get a similar effect by defining WIN32_LEAN_AND_MEAN
> and NOSERVICE before including gc.h? And I think I prefer that, since
> it doesn't risk accidentally not redefining some of the threads
> primitives. Perhaps the right solution is just to document that
I'll just throw my 2 cents in here. Typically WIN32_LEAN_AND_MEAN is
sufficient for a large portion of Windows apps, but there is always that
chance that some one will want a feature this disables. I can also say
that at some point, we have the intention of running our product as a
service - I have no idea what affect NOSERVICE has. The point I am, long
windily, making is that I agree with Hans, it should be documented.
>> -----Original Message-----
>> From: gc-bounces at napali.hpl.hp.com
>> [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Romano Paolo Tenca
>> Sent: Friday, July 06, 2007 11:50 AM
>> To: Gc at napali.hpl.hp.com
>> Subject: [Gc] inclusion of windows.h
>> gc.h includes windows.h.
>> This is a terrific slow down for every source file that only
>> call GC malloc.
>> windows.h is only used for a bunch of symbols which can also
>> be unused in thread environment (using GC_beginthreadex
>> instead of GC_CreateThread)
>> 1) use
>> #define WIN32_LEAN_AND_MEAN
>> #define NOSERVICE
>> # include <windows.h>
>> 2) use a define before including gc.h to ask for
>> GC_CreateThread declaration.
>> Romano Paolo Tenca
>> Gc mailing list
>> Gc at linux.hpl.hp.com
> Gc mailing list
> Gc at linux.hpl.hp.com
More information about the Gc