[Mono-osx] [Mono-dev] OS X builds and -DUSE-MUNMAP
e.norris at mac.com
Wed Jan 24 06:02:11 EST 2007
Hmm. I am not so sure that this has made it, or works as advertised.
i can see - in loading in a very large xml file -
Take this function
public void PopulateXMLString()
// Open xml file
XmlDocument doc = new XmlDocument();
// Turn off external url resolving (e.g. for schema validation)
doc.XmlResolver = null;
// Read version
_version = doc.SelectSingleNode(XmlNode_PList).Attributes
if (_version != SupportedVersion) throw new FormatException("Can
only decode version 1.0 specification files!");
// My Decode dict ( internal class)
_contents = Dict.Decode(doc.SelectSingleNode(XmlNode_PList + '/'
catch (Exception ex)
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.e. to read fom disk I can use :
using (FileStream s = _libraryXmlFile.OpenRead())
with the same results in terms of memory consumption, or worse)
The size increase is possibly a bug in itself, since the .Net side on
windows doing similar code does not bloat to that level.
In any case the object that encapsulates this functionality does not
need to hang around after it's contents are written to a different
so I blow it away like so
if (xmlString.Length != 0)
.. do stuff with the library contents
library = NULL;
The specific call to GC.Collect is just a test case, not normally in
production code. In any case the code bloats and stays bloated. So I
dont think that this fix has made it, unless I am doing somthing
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).
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.
thanks in advance.
> According to your quote it's committed, thus likely in 1.2.2 (Dec
> 6th). There is no 2.1 just yet. :-)
> On 11 Jan 2007, at 12:11, Eoin Norris wrote:
>> Is this scheduled for a release anytime soon, is it in 2.1?
>> -- Eoin
>> On 2 Dec 2006, at 00:07, Allan Hsu wrote:
>>> On Dec 1, 2006, at 2:55 PM, Miguel de Icaza wrote:
>>>>> Nobody has objected to turning on -DUSE_MUNMAP under OS X since I
>>>>> posted this email... Can somebody give me the go-ahead to
>>>>> commit the
>>>>> configure.in change needed to switch over?
>>>> Go ahead.
>>> Allan Hsu <allan at counterpop dot net>
>>> 1E64 E20F 34D9 CBA7 1300 1457 AC37 CBBB 0E92 C779
>> Mono-osx mailing list
>> Mono-osx at lists.ximian.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-osx