Some of you with long memories might remember that I posted a question in the old forum concerning an RTF exporter I've written for DOORS - that time around it was about DOORS apparently crashing while "show"ing the dialogue box. Well I fixed that (it was to do with initialising the array size to -1, which DOORS didn't like). And now I have a user who's managed to run out of memory - apparently. |
Re: "System memory is exhausted" error while writing a buffer to a stream Perhaps your Virtual Memory setting is inexplicably less than 3gb. Forgive ignorance, but is there perhaps some sort of "Virtual Disk Memory" where file write commands are staged?
|
Re: "System memory is exhausted" error while writing a buffer to a stream llandale - Tue Aug 11 10:34:30 EDT 2009
Thanks for the reply Louie - I knew I could rely on you. Physical Memory: Total 3000M Avail 909M Cache 699M Commit Charge: Total 2129M Limit 5074M Peak 2129M Kernel Memory: Total 160M Paged 126M Nonpaged 35M
|
Re: "System memory is exhausted" error while writing a buffer to a stream Tippers - Tue Aug 11 10:49:17 EDT 2009
Thanks for the reply Louie - I knew I could rely on you. Physical Memory: Total 3000M Avail 909M Cache 699M Commit Charge: Total 2129M Limit 5074M Peak 2129M Kernel Memory: Total 160M Paged 126M Nonpaged 35M
Don't know. But if is a DOORS buffer-to-stream limitation, the following function may help: void WriteBufferToStream(Buffer buf, Stream out) { // Write the contents of the buffer to a stream, // Breaking up the individual writes in order // to overcome some unknown Buffer-to-Stream // Limitation. // Calibration, play with this: const int cMaxBuffWriteSize = 10000 // Max bytes to write to Stream if (null buf or null out) return() int LenBuf = length(buf) int NumWritten = 0, NumToWrite = 0 string ErrMess = "" Buffer bufTemp = create() while(NumWritten <= LenBuf) { bufTemp = "" // Erase temp buffer if (LenBuf < NumWritten + cMaxBufWriteSize) //- then NumToWrite = LenBuf - NumWritten else NumToWrite = cMaxBufWriteSize combine(bufTemp, buf, NumWritten, NumWritten + NumToWrite -1) noError() out << bufTemp ErrMess = lastError() if (!null ErrMess) golly, punt I guess. NumWritten += NumToWrite } delete(bufTemp) return() } // end WriteBufferToStream()
|
Re: "System memory is exhausted" error while writing a buffer to a stream http://www.microsoft.com/whdc/system/platform/server/PAE/PAEmem.mspx I've tried to implement the Microsoft workaround, but with no success. |
Re: "System memory is exhausted" error while writing a buffer to a stream jsarkic1 - Mon Aug 24 11:50:14 EDT 2009 Here is my understanding of the Memory situation. 1. Windows XP normally allows only 2gb of memory to be available for application use. 2. DOORS.EXE has a 2gb addressing limitation On a machine with 3gb of memory. Windows XP limits the amount of physical memory available to the applications to be a maximum of 2gb of memory. (MS-Windows will always reserve 1gb of memory for it's own use) We have XP machines that have 4gb of memory. In order to allow the applications to use up to 3 gb of memory we had to set some switches in boot.ini file. Information can be found on the Microsoft support website. Using those switches can be tricky depending on the type of PC you have and the configuration of that machine, so it may not work for all machines. Once you configure your 4gb machine to allow 3gb available for applications. You will have to use a modified version of DOORS.EXE. (Talk to your DOORS Rep) This version of DOORS.EXE is re-compiled to be "Large Address Aware" which means it can support addresses beyond the typical 2gb limitation. Of course, the "Large Address Aware" version of DOORS is not a supported version so you would be on your own. Bottom line, it is possible to have doors.exe use 3gb of memory in a machine with 4 or more gb. |
Re: "System memory is exhausted" error while writing a buffer to a stream Doug.Zawacki - Mon Aug 31 11:11:16 EDT 2009 I'm too facing "memory exhausted" errors. Doors 8.0 user, Win XP SP2 with 4 Gb RAM. I tried the /3GB switch reported later and it seems to work. I tried too to improve page file but it does not allow me to solve the problem of 2 Gb limite. It only improved speed, that is also good. Here is what I did: manage to obtain pagefile defragmented:
It is said that it is better to have 2 physical disks C: and D: (not only partition of one disk). In this case better to configure pagefile on 2d disk. br, Vincent |
Re: "System memory is exhausted" error while writing a buffer to a stream I do facing "memory Exhausted " errors while streaming the data.
I'm using Win7 with 8GBRAM still I'm getting very frequently.
Any suggestions.
Advance thanks |
Re: "System memory is exhausted" error while writing a buffer to a stream lnk369 - Wed Nov 04 11:45:04 EST 2015 I do facing "memory Exhausted " errors while streaming the data.
I'm using Win7 with 8GBRAM still I'm getting very frequently.
Any suggestions.
Advance thanks stream the data to a file and avoid using up memory |
Re: "System memory is exhausted" error while writing a buffer to a stream lnk369 - Wed Nov 04 11:45:04 EST 2015 I do facing "memory Exhausted " errors while streaming the data.
I'm using Win7 with 8GBRAM still I'm getting very frequently.
Any suggestions.
Advance thanks Usually memory exhaustion errors are the result of a programming error. Show us the DXL code, that produces the error - I am pretty sure, that you simply might be leaking a lot of buffers filling up your memory in notime. Regards, Mathias |
Re: "System memory is exhausted" error while writing a buffer to a stream Mathias Mamsch - Sat Nov 07 07:54:53 EST 2015 Usually memory exhaustion errors are the result of a programming error. Show us the DXL code, that produces the error - I am pretty sure, that you simply might be leaking a lot of buffers filling up your memory in notime. Regards, Mathias Thanks for getting back to me.
I'm pulling the requirements from various modules to a single module depending upon the user selection this means depending on features. I tried to increase the DOORS 9.3 RAM limitation to 2GB but problem still same. I do not have customized dxl since it was developed by some other team. if you can advice I'll look into the code and let you know if it rectified.
Any advice is welcome and thanks in advance
Lnk |
Re: "System memory is exhausted" error while writing a buffer to a stream lnk369 - Fri Nov 13 09:21:50 EST 2015 Thanks for getting back to me.
I'm pulling the requirements from various modules to a single module depending upon the user selection this means depending on features. I tried to increase the DOORS 9.3 RAM limitation to 2GB but problem still same. I do not have customized dxl since it was developed by some other team. if you can advice I'll look into the code and let you know if it rectified.
Any advice is welcome and thanks in advance
Lnk First of all, check if your program leaves open modules. The easiest way to fill up memory from the code is to leave modules open. If you made sure, that no modules stay opened, then take the following code from this post: pragma runLim, 0 int *::+(int *ptr1, int ofs) { int *ptr2 = ptr1; ptr2+=ofs; return ptr2 } int *::@(int *ptr, int ofs) { int ad = *(ptr + ofs); int *ptr2 = addr_ ad; return ptr2 } int *getCurrentDXLContextPtr () { DB x = create "" int *ptr = addr_ x int *result = ptr @ 48 destroy x return result } int *getMemoryBlockNodes (int *cc) { return cc @ 0x74 } int *nextNode (int *memNode) { return memNode @ 8 } int countAllocatedObjects() { int *memBlocks = getMemoryBlockNodes getCurrentDXLContextPtr() int count = 0 while (!null memBlocks) { memBlocks = nextNode memBlocks count++ } return count } and put it before the code. Then inside the main loop (after every module where you pulled requirements from) of your code put the following code: print "Allocations: " countAllocatedObjects() "\n" Check how fast the allocations will rise. In my experience DXL will raise memory errors at the most unusual places, because the point where the memory runs out is almost never the point where the memory is wasted. Regards, Mathias |
Re: "System memory is exhausted" error while writing a buffer to a stream Thanks for the inputs.
Meanwhile I'd like to add requirement number before the requirement text(see ex below) to every object which is tagged as requirement Req100v1:The feature shall support all features supported in xxxx 2.0, unless noted here I would like add Req100v1 before the requirement object text and also increment numbers from 100 to end of the documents which are tagged as requirement. Pls. any advice to write a script.
Thanks in advance |