Message-ID: <01c001c30f4e$cf450aa0$0600000a@broadpark.no> From: "Gisle Vanem" To: References: <3eafd245$1_8 AT corp DOT newsgroups DOT com> Subject: Re: [Help] Application Crashes ... due to SIGSEGV ... Date: Wed, 30 Apr 2003 21:29:25 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Reply-To: djgpp AT delorie DOT com "Markus Meng" said: > However the application crashes as soon as some of the memory location > 0x000D0000...0x000D0000 are being accessed. You cannot access that mem-area directly as if it's part of you address space (it's not). That only works with DOS4GW types extenders where DOS-memory is mapped to application data area. But djgpp has near-ptr feature if you prefer to avoid using the 'far' functions. Enable it (read the docs on how), then access the area like so: memcpy (dest, (const void*)(0x000D0000 + __djgpp_conventional_base), length) But it pretty simple using the functions instead: dosmemget (0xD0000, dest, length); The speed advantage of using near-ptr access (memcpy) is neglible cause dosmemget() is pretty smart in moving those bytes. Even faster than _dosmemgetl() even when src/dest are DWORD aligned. --gv