+2011-04-09 Ivan Maidanski <ivmai@mail.ru>
+
+ * os_dep.c (GC_unix_sbrk_get_mem, GC_unix_get_mem): Don't define
+ for RTEMS.
+ * include/private/gcconfig.h (RTEMS): Add support for.
+ * include/private/gcconfig.h (GET_MEM): Use calloc() for RTEMS.
+
2011-04-09 Ivan Maidanski <ivmai@mail.ru>
* mallocx.c (GC_malloc_uncollectable): Move to malloc.c (since
# define DARWIN_DONT_PARSE_STACK
# endif
# endif
+# if defined(__rtems__) && (defined(i386) || defined(__i386__))
+# define I386
+# define RTEMS
+# define mach_type_known
+# endif
# if defined(NeXT) && defined(mc68000)
# define M68K
# define NEXT
# define STACKBOTTOM ((ptr_t)0xc0000000)
# define DATAEND /* not needed */
# endif
+# ifdef RTEMS
+# define OS_TYPE "RTEMS"
+ extern int etext[];
+# define DATASTART ((ptr_t)((((word) (etext)) + 0xfffff) & ~0xfffff))
+# define DATAENT ((ptr_t)(DATASTART + 0xfffff))
+# define STACKBOTTOM ((ptr_t) 0x03fff000)
+# endif
# ifdef DOS4GW
# define OS_TYPE "DOS4GW"
extern long __nullarea;
# define GET_MEM(bytes) HBLKPTR((ptr_t)os2_alloc((size_t)bytes \
+ GC_page_size) \
+ GC_page_size-1)
-# elif defined(NEXT) || defined(DOS4GW) || defined(NONSTOP) || \
- (defined(AMIGA) && !defined(GC_AMIGA_FASTALLOC)) || \
- (defined(SOLARIS) && !defined(USE_MMAP))
-# define GET_MEM(bytes) HBLKPTR((size_t) calloc(1, (size_t)bytes + GC_page_size) \
- + GC_page_size-1)
+# elif defined(NEXT) || defined(DOS4GW) || defined(NONSTOP) \
+ || (defined(AMIGA) && !defined(GC_AMIGA_FASTALLOC)) \
+ || (defined(SOLARIS) && !defined(USE_MMAP)) || defined(RTEMS)
+# define GET_MEM(bytes) HBLKPTR((size_t)calloc(1, \
+ (size_t)bytes + GC_page_size) \
+ + GC_page_size - 1)
# elif defined(MSWIN32) || defined(CYGWIN32)
ptr_t GC_win32_get_mem(GC_word bytes);
# define GET_MEM(bytes) (struct hblk *)GC_win32_get_mem(bytes)
# if !defined(OS2) && !defined(PCR) && !defined(AMIGA) && !defined(MSWIN32) \
&& !defined(MSWINCE) && !defined(MACOS) && !defined(DOS4GW) \
- && !defined(NONSTOP) && !defined(SN_TARGET_PS3)
+ && !defined(NONSTOP) && !defined(SN_TARGET_PS3) && !defined(RTEMS)
# define SBRK_ARG_T ptrdiff_t