[Gc] inclusion of windows.h

Boehm, Hans hans.boehm at hp.com
Mon Jul 9 15:59:47 PDT 2007


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


> -----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)
> Suggestion:
> 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
> https://www.hpl.hp.com/hosted/linux/mail-archives/gc/

More information about the Gc mailing list