X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f NNTP-Posting-Date: Tue, 18 Aug 2009 22:52:52 -0500 From: "Charles Sandmann" Newsgroups: comp.os.msdos.djgpp References: Subject: Re: freedos and cwsdpmi with djgpp under Linux? Date: Tue, 18 Aug 2009 22:52:42 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5843 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-RFC2646: Format=Flowed; Response Message-ID: Lines: 25 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 64.91.192.48 X-Trace: sv3-IXMAbZq7PmIGJ8tSUBkn0lG9zomDMT6em1CzUiHubfKdCGz23CYlP5Ks2xQFgWkVwQ9zVBC9jE+vFx8!DJ5INK8rQivbVaEu3DareCkgRTo8DQYe1IFzi6Uz9I8qOIHv8qtFLHrfw9VtR97OETsa5Cr71aWL!4iY2a6GeBqg0ODPGT76VrU7NU7s2Uj4= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.39 X-Original-Bytes: 2533 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com >> Allocated 8M DMA buffer at DJGPP address 0x93b00, physical 0x113b00 >> Virtual: 0x1000 Physical: 0x100000 Size: 0x13000 >> Virtual: 0x91000 Physical: 0x916000 Size: 0x1000 >> Virtual: 0x92000 Physical: 0x914000 Size: 0x1000 >> Virtual: 0x93000 Physical: 0x113000 Size: 0x1000 >> Virtual: 0x94000 Physical: 0x115000 Size: 0x7ff000 >> Virtual: 0x893000 Physical: 0x114000 Size: 0x1000 >> Virtual: 0x897000 Physical: 0x915000 Size: 0x1000 >> >> Looking at the Physical address, it's apparent that they are not >> contiguous. If I used XMS would I get a contiguous one? Wait a second here ... Note the text allocated 8MB buffer @ 93b00 The rest of the virtual/physical descriptions are for most of the rest of your image (0x13000 at start of memory, some stack at 0x916000, expanding down, some malloc increase at 0x113000). So expecting that you want 4KB aligned memory, allocating 8MB, then rounding up to nearest 4MB page 0x94000 - you get 4MB - 4KB of buffer to play with. (the other strangeness in memory layout has to deal with sbrk setting boundaries around the memory block). So it appears you have the 1MB buffer you need here.