From: David Eberhard Newsgroups: comp.os.msdos.djgpp Subject: Re: (new question) problem with memory allocation Date: Thu, 08 Jan 1998 21:24:11 -0700 Organization: XMission Internet (801 539 0900) Lines: 15 Message-ID: <34B5A66B.F080924D@xmission.com> References: <199801090150 DOT RAA16234 AT adit DOT ap DOT net> <34B58A15 DOT B86CC43B AT xmission DOT com> <34B5970D DOT 148A AT tssc DOT co DOT nz> NNTP-Posting-Host: slc344.modem.xmission.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Bill Currie wrote: > Yup, DPMI is failing your set limit call. Segments over 1M in lengt > must be a multiple of 4k. This means you must use a segment limit of > 2002944 (unless you want to go the other way). Anyway, wouldn't you > want to go to 2097152 (2M exactly)? I tried that, and it didn't work. I took that number and subtracted one, and it worked then. I think the reason is that the function I was calling set the limit to be "2097152" bytes from the base address, but when setting the limit, you must subtract one because the base address counts as one byte. -David toothpck AT xmission DOT com http://www.xmission.com/~toothpck/index.html