Pedro Alves wrote: > On Sunday 31 August 2008 11:32:47, Hywel B. Richards wrote: > >> I can compile with the mingw32ce version, but it just runs too slow, and >> I have not as yet managed to fix this by using the allocator directly or >> by using special allocators. >> > > Boo, sorry to hear that. :-(. Well, this is not really mingw32ce's > fault, but MSFT runtime's... > >
Or viewed from another perspective, it shows how good the dlmalloc in newlib is! > Anything in particular in mingw32ce that makes it hard to go brute > force and import Doug Lea's malloc into your project? > > Only my own technical competence! But I would love to try this, if for no other reason to confirm for sure that this is the only problem. I am compiling with exactly the same compile time options on both mingw32ce and cegcc, and memory allocation is the only thing that I can think of that would be different between the builds. Also, I know that using special allocators for some of the datastructures can reduce compute time by a lot for the mingw32ce build (but not as much as building with cegcc build - interestingly using the special allocators with the cegcc build makes only a tiny difference, suggesting that it is pretty good to start with - same thing on linux too). If anyone can provide any pointers on how to use the newlib malloc with mingw32ce I would be grateful. I think I know how to override global new and delete, but trying to extract the relevant part of newlib I would find more difficult. It would also be of interest to me to know how to do this for "regular" (ia32) windows, although it seems we have less of an issue there (after making some changes to datastructures). I guess that it would also be nice to make such changes easily used across different projects, e.g. adding a "--use-dlmalloc" option to arm-wince-mingw32ce-g++ (I guess that is what arm-wince-cegcc-g++ is to me right now!). Another point of interest when comparing cegcc and ming32ce is code size. I use static linking with the cegcc and libstdc++ libraries to make it easier to install the DLL I am building. The version of mingw32ce I am using doesn't use separate libraries either. It turns out that in this configuration, after stripping the DLLs, the cegcc-build DLL is slightly smaller than the mingw32ce one, which rather suprised me. Saying that, the difference is pretty small (2%, 2.01MB for mingw32ce and 1.97MB for cegcc), and it's not a very scientific comparison as there are a few more funcs that I include in the mingw32ce build (maybe gettimeofday, or similar), though I would be surprised if they made up the 46kB difference. So this is why using cegcc seems like a good idea for me right now - it runs much faster (presumably due to the memory allocator), and there is no downside in terms of code size. Hywel. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Cegcc-devel mailing list Cegcc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cegcc-devel