From: Waldemar Schultz Newsgroups: comp.os.msdos.djgpp Subject: CWS DPMI why does this program crash ? Date: Mon, 27 Sep 1999 18:02:17 +0200 Organization: [posted via] Leibniz-Rechenzentrum, Muenchen (Germany) Lines: 191 Distribution: world Message-ID: <37EF9509.6037786A@ma.tum.de> References: <7so38g$ns6$1 AT news6 DOT svr DOT pol DOT co DOT uk> NNTP-Posting-Host: pcritter1.mathematik.tu-muenchen.de Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mozilla 4.6 [de] (Win95; I) X-Accept-Language: de,en-US To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com >alloc.exe =========================================================================== 29 MB 1e0684c 30 MB 1f0a84c 31 MB 200e84c Exiting due to signal SIGSEGV General Protection Fault at eip=00003823 eax=448b3600 ebx=020d03f8 ecx=00000410 edx=020d03fc esi=020d080c edi=00000410 ebp=0008dc9c esp=0008dc88 program=C:\USR\FGSM\H2O\SIM\ALLOC.EXE cs: sel=00a7 base=10000000 limit=020dffff ds: sel=00af base=10000000 limit=020dffff es: sel=00af base=10000000 limit=020dffff fs: sel=008f base=00009840 limit=0000ffff gs: sel=00bf base=00000000 limit=0010ffff ss: sel=00af base=10000000 limit=020dffff App stack: [0008dcec..0000dcec] Exceptn stack: [0000dbd4..0000bc94] Call frame traceback EIPs: 0x00003823 _malloc+551 0x000020a2 _calloc+18 0x00001584 _main+20, line 18 of alloc.c 0x00001c72 ___crt1_startup+174 gcc =============================================================================== Reading specs from d:/djgpp/lib/specs gcc version 2.8.1 d:/djgpp/lib/gcc-lib/djgpp/2.81/cpp.exe -lang-c -v -undef -D__GNUC__=2 -D__GNUC_MINOR__=8 -Dunix -Di386 -DGO32 -DMSDOS -DDJGPP=2 -DDJGPP_MINOR=2 -D__unix__ -D__i386__ -D__GO32__ -D__MSDOS__ -D__DJGPP__=2 -D__DJGPP_MINOR__=2 -D__unix -D__i386 -D__GO32 -D__MSDOS -D__DJGPP=2 -D__DJGPP_MINOR=2 -g alloc.c c:/temp\ccaqls3i GNU CPP version 2.8.1 (80386, BSD syntax) #include "..." search starts here: #include <...> search starts here: d:/djgpp/include C:/usr/include d:/djgpp/contrib/include d:/djgpp/lib/gcc-lib/djgpp/2.81/include d:/djgpp/include End of search list. d:/djgpp/lib/gcc-lib/djgpp/2.81/cc1.exe c:/temp\ccaqls3i -m486 -malign-jumps=2 -malign-loops=2 -malign-functions=2 -quiet -dumpbase alloc.c -g -version -o c:/temp\ccbqls3i GNU C version 2.8.1 (djgpp) compiled by GNU C version 2.8.1. d:/djgpp/bin/as.exe -o c:/temp\cccqls3i c:/temp\ccbqls3i d:/djgpp/bin/ld.exe -o alloc.exe d:/djgpp/lib/crt0.o -Ld:/djgpp/lib -Ld:/djgpp/contrib/lib -Ld:/djgpp/lib/gcc-lib/djgpp/2.81 -Ld:/djgpp/bin -Ld:/djgpp/lib c:/temp\cccqls3i -Tdjgpp.djl -lgcc -lc -lgcc d:/djgpp/bin/stubify.exe -v alloc.exe stubify for djgpp V2.X executables, Copyright (C) 1995 DJ Delorie stubify: alloc.exe -> alloc.000 -> alloc.exe alloc.c =================================================================== #include #include int main(void) { unsigned long i; char *mem=NULL; size_t nn; #define KILO 1024L #define MEGA (KILO*KILO) #define GIGA (KILO*MEGA) nn=KILO; for(i=0; ;i+=nn) /*forever*/ { mem=(char *)calloc(nn,1); if(!mem) break; if(!(i%MEGA)) { printf("%3ld MB %8p\n",i/MEGA,mem); fflush(stdout); } } return 0; } cwsdpmi ==================================================================== CWSDPMI V0.90+ (r4) Copyright (C) 1997 CW Sandmann ABSOLUTELY NO WARRANTY cwsparam ==================================================================== Full name of paging file ("" to disable) ? [H:\cwsdpmi.swp] Number of page tables to initially allocate (0=auto) ? [0] Minimum application memory desired before 640K paging ? [512Kb] Paragraphs of DOS memory to reserve when 640K paging ? [3840] Paragraphs of memory for extra CWSDPMI internal heap ? [16384] Maximum number of 4K pages in swap file ? [32767] Value of run option flags ? [0] go32/v2 version 2.0 built Nov 15 1998 14:36:43 ======================================================================= Usage: go32 coff-image [args] Rename this to go32.exe only if you need a go32 that can run v2 binaries as well as v1 binaries (old makefiles). Put ahead of the old go32 in your PATH but do not delete your old go32 - leave it in the PATH after this one. Set GO32_V2_DEBUG=y in the environment to get verbose output. DPMI memory available: 33285 Kb DPMI swap space available: 129911 Kb mem.exe (BTW the machine runs a PII with 128 MB Ram installed !! ??) ======================================================================== Speichertyp Insgesamt = Verwendet + Frei ----------------- ---------- --------- --------- Konventioneller 640K 38K 602K Hoher 134K 103K 31K Reserviert 0K 0K 0K Erweiterung (XMS) 82.289K 16.754K 65.535K ----------------- ---------- --------- --------- Insg. Speicher 83.063K 16.894K 66.169K Insg. unter 1 MB 774K 141K 634K Maximale Gr”áe fr ausfhrbares Programm 602K (616.640 Byte) Gr”áter freier Block im hohen Speicherblock 21K (21.824 Byte) MS-DOS ist resident im oberen Speicherbereich (High Memory Area). config.sys ========================================================================= DEVICE=C:\sys\HIMEM.SYS /testmem:off DEVICE=C:\sys\EMM386.EXE NOEMS rem -----------------GCC optimal ??? what's best ??? rem :: DEVICE=C:\sys\EMM386.EXE NOEMS NOVCPI rem :: DEVICE=C:\sys\EMM386.EXE NOEMS NOVCPI L=640 rem :: DEVICE=C:\sys\EMM386.EXE NOEMS ROM=C000-C800 I=E000-EFFF DOS=UMB,HIGH FILES=30 break=on shell=C:\COMMAND.COM C:\ /E:8192 /P COUNTRY=049,850,C:\dos\COUNTRY.SYS rem -------SCSI-HOST DEVICEHIGH C:\sys\SCSI\ASPI8DOS.SYS /D rem -------SCSI-JAZ-HDISK DEVICEHIGH C:\sys\SCSI\ASPIDISK.SYS /D rem -------CDROM rem :::::::DEVICEHIGH C:\sys\SCSI\ASPICD.SYS /D:ASPICD0 rem -------DISKCACHE DEVICEhigh C:\dos\ANSI.SYS ver ========================================================== MS-DOS Version 6.22 Revision A DOS ist im oberen Speicherbereich (High Memory Area) any help highly appreciated! _____________________ Waldemar Schultz Technische Universität München Zentrum Mathematik M1, SCA D 80290 München Tel: +49 (0)89 2892 8226 FAX: +49 (0)89 2892 8228 e-mail: schultz AT ma DOT tum DOT de ________________________________________