Date: Thu, 29 May 1997 16:49:58 +0300 (IDT) From: Eli Zaretskii To: djgpp AT delorie DOT com Subject: Re: virtual memory , paging ect In-Reply-To: <338CE8D7.7A56@nowhere.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Wed, 28 May 1997, James Hetfield wrote: > I'm new to protected mode programming and im trying to write a program > that requires alot of memory. Anyway I get an error everytime that says > I dont have enough dpmi memory. Dosn't dpmi support > up to 256 mbytes vmen. That depends on the DPMI host. If you run on plain DOS and use CWSDPMI, then you have 128MB + whatever is physically installed on your machine, provided that you have at least 128MB of free disk space. Other hosts like Windows may not let you use more than 64MB. See the FAQ for more details. > If so how do I use it? Heres some partial source > of what I'm trying to do ( this is for an emulator btw) > UWORD *RAM[0xffffff] > > RAM[0]= malloc(0x80000); /* rom image */ > RAM[c00000] = malloc(0x10000); > RAM[c40000] = malloc(0x10000); Please post the smallest complete program that does this and fails, and also the exact error message that you get. Your problem might stem not from malloc, but from something very different. For example, if RAM[] is automatic variable, then it overflows your stack (which is by default only 256K). A word or two about your system configuration (hardware and software, including memory managers, DPMI hosts, Windows if any, etc.) would be also nice. Remember: we only know as much about your problem as you elect to tell us. > Someone told me I would need to write my own virtual paging > routines,handles ect Based on what you tell (which ain't much), I don't think you should go that far. Yet.