[Gc] Another bug in os_dep.c

Boehm, Hans hans_boehm at hp.com
Tue Dec 30 18:45:36 PST 2003


Obviously, I messed up this section of code in the 6.3alpha3 os_dep.c, and some of the Darwin-specific
stuff also has serious problems.  I'll post another alpha release shortly.

Unfortunately, My RedHat 8 mmap documentation recommends MAP_ANONYMOUS, and labels MAP_ANON as
"deprecated".  Darwin seems to define only MAP_ANON.  None of this seems to be mentioned in the
Single Unix Spec.  Hence I ended up with the following in os_dep.c.  Does anyone see
anything wrong with this?  Is it called MAP_ANON for other operating systems that support it (if any)?

Hans

#ifdef USE_MMAP_ANON
# define zero_fd -1
# if defined(LINUX)
#   define OPT_MAP_ANON MAP_ANONYMOUS
# else
#   define OPT_MAP_ANON MAP_ANON
# endif
#else
  static int zero_fd;
# define OPT_MAP_ANON 0
#endif 

> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com
> [mailto:gc-bounces at napali.hpl.hp.com]On Behalf Of Andrew Begel
> Sent: Sunday, December 21, 2003 1:04 AM
> To: 'gc at linux.hpl.hp.com'
> Subject: [Gc] Another bug in os_dep.c
> 
> 
> And in the last code snippet in os_dep.c, MAP_ANONYMOUS should be 
> MAP_ANON.
> 
> Andrew
> 
> _______________________________________________
> Gc mailing list
> Gc at linux.hpl.hp.com
> http://linux.hpl.hp.com/cgi-bin/mailman/listinfo/gc
> 


More information about the Gc mailing list