(code refactoring of commit
d16debf3e)
Issue #173 (bdwgc).
* include/private/gcconfig.h [MSWIN_XBOX1] (durango_get_mem): Rename
to GC_durango_get_mem; change return type from void* to ptr_t; remove
page_size argument.
* os_dep.c [MSWIN_XBOX1] (durango_get_mem): Likewise.
* include/private/gcconfig.h [MSWIN_XBOX1] (GET_MEM): Use
GC_durango_get_mem (instead of durango_get_mem).
GC_page_size)) \
+ GC_page_size - 1)
# elif defined(MSWIN_XBOX1)
- void *durango_get_mem(size_t bytes, size_t page_size);
-# define GET_MEM(bytes) (struct hblk *)durango_get_mem(bytes, 0)
+ ptr_t GC_durango_get_mem(size_t bytes);
+# define GET_MEM(bytes) (struct hblk *)GC_durango_get_mem(bytes)
# elif defined(MSWIN32) || defined(CYGWIN32)
ptr_t GC_win32_get_mem(size_t bytes);
# define GET_MEM(bytes) (struct hblk *)GC_win32_get_mem(bytes)
# endif /* OS2 */
-# ifdef MSWIN_XBOX1
- void *durango_get_mem(size_t bytes, size_t page_size)
+#ifdef MSWIN_XBOX1
+ ptr_t GC_durango_get_mem(size_t bytes)
{
if (0 == bytes) return NULL;
- return VirtualAlloc(NULL, bytes, MEM_COMMIT | MEM_TOP_DOWN,
- PAGE_READWRITE);
+ return (ptr_t)VirtualAlloc(NULL, bytes, MEM_COMMIT | MEM_TOP_DOWN,
+ PAGE_READWRITE);
}
-# endif
-
-#ifdef MSWINCE
+#elif defined(MSWINCE)
ptr_t GC_wince_get_mem(size_t bytes)
{
ptr_t result = 0; /* initialized to prevent warning. */