From: ams AT ludd DOT luth DOT se (Martin Str|mberg) Newsgroups: comp.os.msdos.djgpp Subject: Re: Fixed stack size? Date: 14 Aug 1999 08:37:37 GMT Organization: University of Lulea, Sweden Message-ID: <7p39sh$m2v$1@news.luth.se> References: NNTP-Posting-Host: queeg.ludd.luth.se X-Newsreader: TIN [UNIX 1.3 950824BETA PL0] Lines: 40 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Eli Zaretskii (eliz AT is DOT elta DOT co DOT il) wrote: : : On 5 Aug 1999, Martin Str|mberg wrote: : : > No I don't think I do. Physically it would be mapped in but as the : > DPMI server hasn't given it to a client to use it's logically : > unmapped. So the server has to decide when page fault happens, if it's : > logically unmapped, to deliver a SIGSEGV; or if it _is_ mapped, swap : > in the page and let the client continue. : > : > In one sentence, the DPMI server will use page faults to generate : > SIGSEGVs. : : I'm probably missing something. Are you telling that accessing some : addresses within the DS limits could, under some circumstances, : deliver a SIGSEGV to the application? If so, can you write a program : that demonstrates this? I think what you are missing is that I'm talking about the server. : The only way known to me of having parts of the address space unmapped : is to explicitly decommit those parts. That's what the DJGPP startup : code does with the null page. But that requires an explicit DPMI call : by the application, and isn't supported by any DPMI server except : CWSDPMI and 386Max. Yes, but I'm not suggesting to explicitly unmap some addresses. I'm trying to figure out a way to get SIGSTACK_OVERFLOW (to the client). It seems to me one way of doing this is to have one page below the stack marked as not present. When the application touches this page the server acts as if the page is unmapped and deliver SIGSTACK_OVERFLOW to the client instead of SIGSEGV. This will of course never work in WINDOZE as we can't modify the server there... Shostakovich, String Quartet 15, MartinS