[Gc] inclusion of windows.h

Romano Paolo Tenca rotenca at telvia.it
Fri Jul 6 11:49:33 PDT 2007


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



More information about the Gc mailing list