[Mono-osx] [Mono-dev] OS X builds and -DUSE-MUNMAP
allan at counterpop.net
Wed Jan 24 12:49:36 EST 2007
On Jan 24, 2007, at 3:02 AM, Eoin Norris wrote:
The GC change is in SVN, but it hasn't been merged into the release
tree. If you're using the official release packages, you won't see
any improvement in GC behavior.
> This bloats to 200MB when reading a 23MB xml file - mostly in
> doc.LoadXml(_libraryXmlString) as far as I can see ( although
> without a full debugger it is hard to tell) . I have also would do
> the same if it were read from disk at this point, a process that
> is too slow in any case, so I load in the Cocoa layer instead.
I suspect that this process causes a lot of temporary objects of
varying sizes to be allocated. The current GC doesn't behave the best
while allocating large chunks of memory, especially when this pattern
is atypical for your application. It causes a lot of new pages to be
allocated for objects of various sizes that will be unlikely to be
used again in the lifetime of your application.
> Were I to download the sources, where should I look to see if this
> is in the suggested sources i.e. 18.104.22.168 ? Is there a way to tell
> from the dlls ( I suspect not).
This is the relevant part of configure.in:
CPPFLAGS="$CPPFLAGS -no-cpp-precomp -D_THREAD_SAFE -
DGC_MACOSX_THREADS -DPLATFORM_MACOSX -DUSE_MMAP -DUSE_MUNMAP"
If you compare the release tarball to the one in SVN, you can see
that the release doesn't turn these flags on.
> I should add this is really a deal breaker in terms of releasing
> the product, as you can imagine not releasing large amounts of
> memory is a big issue.
Yes. Yes it is. I'm not sure why the change hasn't made it into
release tree. You'll have to ask somebody like Miguel or Wade about
Allan Hsu <allan at counterpop dot net>
1E64 E20F 34D9 CBA7 1300 1457 AC37 CBBB 0E92 C779
More information about the Mono-osx