|
-
March 30th, 1999, 06:43 AM
#1
VC++ 5.0 MFC Memory Paging problem.I think!
Hi gurus,
I have been working on a project which involved many dialogs, classes and structures. So far so good, that is until now.
On exit of my program, it crashed with the standard error of "page fault". I narrow
it down to a structure , a small structure of only 15 byte of variables in total.
However, if i commented half the structure out, program runs perfectly. If I just add one extra byte in the above structure, program would crashed on exit.
Which seems to me like a memory paging problem....I think.
If indeed so, how do I increased the paging in MFC dialog environment.
If any of you knows or experienced similar problem, please help.
Thank you.
-
March 30th, 1999, 06:50 AM
#2
Re: VC++ 5.0 MFC Memory Paging problem.I think!
It's more likely to be caused by writing to the wrong bit of memory using a bad pointer. It also sounds like the operation may involve copying the suspect structure...
Dave
-
March 30th, 1999, 07:06 AM
#3
Paging Problem
Hi Dave,
Thanks for your prompt response. I neglected to mention that in my code, I have actually commented out the bit where the structure is used. So in fact the srtucture does not come into play while running the code. That is, the structure is merely declared but not used. Nevertherless, it still crashed the program.
I have proven this by commented out the structure. The program runs fine.
As I mentioned, if I uncomment half the structure, the program runs fine.
(Don't forget, during all this time the structure is not used in the running of the program). So pointer or copy of structure does not come into play at all.
What next........
-
March 30th, 1999, 07:24 AM
#4
Re: Paging Problem
I don't know. If a bad pointer is writing to the wrong bit of memory, perhaps the additional memory allocation caused by your structure may shift stack or heap memory enough so it writes over a page boundary?
I would be very surprised if it turns out to be a system software bug rather than an application code bug. The change in behaviour caused by your changing your memory allocation sounds typical of an invalid write caused by a bad pointer or something similar.
Sorry I can't be more help,
Dave
-
March 30th, 1999, 05:03 PM
#5
Re: Try to use Window NT
Hi.
If you think that OS has something wrong with its buffer and Paging capacity,
you can manually change them if you use Window NT.
Try to use Help of Window NT to know how we change them.
One more thing is that you use debugger your code even though your project is huge. I think that it is a short-cut to figure out your problem.
Hope for help?
-Masaaki Onishi-
-
March 31st, 1999, 02:30 AM
#6
Paging problem
Ohayo Mr.Onishi,
Thanks for your response. Unfortunately I am stuck with Window 95 OS.
I am not entirely sure if it is a OS problem. It could well be an MFS problem.
Thanks for your help anyway.
Sayunara.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|