[Gc] GC + Windows Mobile + Threads + Patch for WINCE

biosli biosli at hotmail.com
Mon Aug 24 01:09:28 PDT 2009


Dear Ivan:
Last letter you wrote:
> I set env var GC_MAXIMUM_HEAP_SIZE=25000000 and it works for me well (on Win32).
> Could you try this config: -Ox -DALL_INTERIOR_POINTERS -DNO_DEBUGGING -DSMALL_CONFIG -DGC_THREADS -D_WIN32_WCE -DUNDER_CE -Iinclude
I add the configs to stdafx.h
-------after add configs---------stdafx.h--------
#ifdef _MT
#  define GC_THREADS 1
#endif
//…
#ifndef SMALL_CONFIG
#   define SMALL_CONFIG
#endif //SMALL_CONFIG
 
#ifndef NO_DEBUGGING
#   define NO_DEBUGGING 

#endif //NO_DEBUGGING
 
Un-comment the ALL_INTERIOR_POINTERS in gc_priv.h:
--- C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/gc_priv.h-revBASE.svn000.tmp.h
+++ D:/WorkBackup/My_Test_Project/bdwgc/include/private/gc_priv.h
@@ -126,7 +126,7 @@
               /* Enable stubborn allocation, and thus a limited    */
               /* form of incremental collection w/o dirty bits.     */
 
-/*#define ALL_INTERIOR_POINTERS*/ 
+#define ALL_INTERIOR_POINTERS
               /* Forces all pointers into the interior of an     */
               /* object to be considered valid.  Also causes the  */
               /* sizes of all objects to be inflated by at least      */
 
And build the project under wince platform(same as add _WIN32_WCE and UNDER_CE)
 
The test_libgc is running farther, enter the mktree function, then could get no more memory.(GC_wince_get_mem in os_dep.c).
 
Then I defined VERY_SMALL_CONFIG, and the test passed.
Output result:
Thread wait failed 6
Thread wait failed 6
Thread wait failed 6
Received WM_CLOSE, closing window
The thread 'GC_win32_start' (0xeed20a86) has exited with code 0 (0x0).
Completed 6 tests
Allocated 802768 collectable objects
Allocated 1212 uncollectable objects
Allocated 0 atomic objects
Allocated 0 stubborn objects
Finalized 1649/1649 objects - finalization is probably ok
Total number of bytes allocated is 24109758
Final heap size is 18325504 bytes
Unexpected heap growth - collector may be broken
Collector appears to work
The thread 'GC_win32_start' (0x2ee7728a) has exited with code 0 (0x0).
 
Could you share your thoughts on the test result?
 
By the way, I saw you changed the gc.h for backtrace, as following:
--- CVS_plus_112_and_114/bdwgc/include/gc.h     2009-08-08 12:17:42.000000000 +0400
+++ updated/bdwgc/include/gc.h      2009-08-20 19:33:10.000000000 +0400
@@ -524,10 +524,9 @@
 #endif
 
 #if defined(_MSC_VER) && _MSC_VER >= 1200 /* version 12.0+ (MSVC 6.0+)  */ \
-    && !defined(_AMD64_)
-# ifndef GC_HAVE_NO_BUILTIN_BACKTRACE
-#   define GC_HAVE_BUILTIN_BACKTRACE
-# endif
+   && !defined(_AMD64_) && !defined(GC_HAVE_NO_BUILTIN_BACKTRACE) \
+   && !defined(_WIN32_WCE) && !defined(GC_HAVE_BUILTIN_BACKTRACE)
+# define GC_HAVE_BUILTIN_BACKTRACE
 #endif
I found it was could not passed compiling. The error as below:
1>os_dep.c
1>..\..\os_dep.c(4098) : error C4013: 'GC_save_regs_in_stack' undefined; assuming extern returning int
1>..\..\os_dep.c(4099) : error C2037: left of 'fr_savfp' specifies undefined struct/union 'frame'
1>..\..\os_dep.c(4104) : error C2037: left of 'fr_savfp' specifies undefined struct/union 'frame'
1>..\..\os_dep.c(4107) : error C2037: left of 'fr_savpc' specifies undefined struct/union 'frame'
 
Best wishes,
GC Beginner
Zeyi Lee
_________________________________________________________________
您可以借助 Windows Live 整理、编辑和共享您的照片。
http://www.microsoft.com/china/windows/windowslive/products/photo-gallery-edit.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://napali.hpl.hp.com/pipermail/gc/attachments/20090824/768101a9/attachment-0001.htm


More information about the Gc mailing list