Thanks for your prompt reply, Vinod.
I tried your suggestion, but unfortunately it does not help. I still think
that the parsing operation in the 'while' loop is causing the page faults.

regards,
Shlomi.

-----Original Message-----
From: Vinodkumar S [mailto:[EMAIL PROTECTED]]
Sent: Mon, August 13, 2001 6:00 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Page faults, when running DOM parser on windows NT


Hello shlomi,
i don't think so u should use new and delete operator in DOM , since it
handles memory management differently, u have create a object of Parser, try
something like this one,

DOMParser parser;

regards
Vinod
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
VINODKUMAR S.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To follow the path, look to the master, 
follow the master, walk with the master, 
see through the master, become the master.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SIEMENS COMMUNICATION SOFTWARE         
Other      : [EMAIL PROTECTED] 
Phone                       
Off        : (+91)-80-559 4067-73 
Extn.      : 4513        
Res        : (+91)-80-565 3792   
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    






-----Original Message-----
From: Shlomi Afia [mailto:[EMAIL PROTECTED]]
Sent: Sunday, August 12, 2001 9:47 PM
To: '[EMAIL PROTECTED]'
Subject: Page faults, when running DOM parser on windows NT


Hi there,
I'm running this simple test program on Windows NT,  using xerces version
1.3.0:

int main(int argc, char* argv[])
{
        char buffer[5000];

        XMLPlatformUtils::Initialize();
        DOMParser* parser = new DOMParser;

        FILE* stream = fopen("D:\\Temp\\test.xml", "r"); 
        int bufferSize = fread(buffer, sizeof(char), 5000, stream);
        fclose(stream);

        while (true)
        {
                MemBufInputSource memBuff((XMLByte*)buffer, bufferSize, "");
                parser->parse(memBuff);
                Sleep(10);
        }

        delete parser;
        return 0;
}

To my surprise it has a lot of memory page faults! (the test.xml file is
less then 5000 bytes).
Does anybody know how can I reduce the amount of page faults the DOM parser
creates?

thanks,
Shlomi.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to