www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/04/10/10:08:53

From: DBI <DBI AT ficsgrp DOT com>
To: "'jesus AT matrust DOT es'" <jesus AT matrust DOT es>
Cc: "'djgpp AT delorie DOT com'" <djgpp AT delorie DOT com>
Subject: RE:malloc crash
Date: Wed, 10 Apr 96 15:55:00 PDT
Message-ID: <316C3C7C@macduff.ficsgrp.com>
Encoding: 22 TEXT, 49 UUENCODE

I've tried the following program to test the malloc crash and I can   
conclude:
It crashes under CWSDPMI but not under Windows 95. I also noticed that   
it's on the moment that a malloc fails (or in the next malloc?) that this   
crash occurs. BTW : I did this test under CWSDPMI Beta 9, not the final   
release (I'll check that later), so maybe there is no problem?

#include <stdlib.h>

void main() {
  int i;
  void *ptr;
  for (i = 0; i < 5000; i++)  {
     ptr = (void *)malloc (10000);
     printf ("%d:%d\n", i, (ptr==NULL));
  }
}

Dominique Biesmans
(sorry for the winmail.dat crap that follows , it's because of our mail   
server)  

The following binary file has been uuencoded to ensure successful
transmission.  Use UUDECODE to extract.

begin 600 WINMAIL.DAT
M>)\^(BX-`0:0"``$```````!``$``0>0!@`(````Y`0```````#H``$(@`<`
M&````$E032Y-:6-R;W-O9G0 AT 36%I;"Y.;W1E`#$(`0V`!``"`````@`"``$$
M@`$`$````%)%.FUA;&QO8R!C<F%S:`!Z!0$%@`,`#@```,P'!``*``\`-P`L
M``,`5@$!((`#``X```#,!P0`"@`/`"D`!0`#`"$!`0F``0`A````03DP-SDY
M04)%-CDR0T8Q,3 AT Q-$8P,#@P0S AT Q1D0X,$(`,@<!!)`&`,0"```"````#0``
M``,``#`#````"P`/#@`````"`?\/`0```$H``````````&"49&!!N`$(`"LK
MBBD``&U$B`!D`!H`.``2````%``G9&IG<'!`9&5L;W)I92YC;VTG`&1J9W!P
M0&1E;&]R:64N8V]M````'@`",`$````%````4TU44``````>``,P`0```!(`
M``!D:F=P<$!D96QO<FEE+F-O;0````,`%0P"`````@'Y#P$```!!````````
M`($K'Z2^HQ`9G6X`W0$/5`(```$`9&IG<'!`9&5L;W)I92YC;VT`4TU44`!D
M:F=P<$!D96QO<FEE+F-O;0`````#`/X/!@```!X``3`!````%````"=D:F=P
M<$!D96QO<FEE+F-O;2<``@$+,`$````7````4TU44#I$2D=04$!$14Q/4DE%
M+D-/30```P``.0`````+`$`Z``````(!]@\!````!`````````,-`````P``
M,`0````+``\.``````(!_P\!````2```````````8)1D8$&X`0@`*RN**0``
M;42(`&0`&@`W`!$````4`"=J97-U<T!M871R=7-T+F5S)P!J97-U<T!M871R
M=7-T+F5S`!X``C`!````!0```%--5%``````'@`#,`$````1````:F5S=7-`
M;6%T<G5S="YE<P`````#`!4,`0````(!^0\!````/P````````"!*Q^DOJ,0
M&9UN`-T!#U0"```!`&IE<W5S0&UA=')U<W0N97,`4TU44`!J97-U<T!M871R
M=7-T+F5S```#`/X/!@```!X``3`!````$P```"=J97-U<T!M871R=7-T+F5S
M)P```@$+,`$````6````4TU44#I*15-54T!-051255-4+D53`````P``.0``
M```+`$`Z``````(!]@\!````!`````````02AP$#D`8`R`,``!`````+`",`
M``````,`)@``````"P`I```````#`#8``````$``.0``3X-IY2:[`1X`<``!
M````$````%)%.FUA;&QO8R!C<F%S:``"`7$``0```!8````!NR;E:8.KF0>J
MDN81SX%/`(#(']@+```#``80&'.1@`,`!Q#A`0``'@`($`$```!E````259%
M5%))14142$5&3TQ,3U=)3D=04D]'4D%-5$]415-45$A%34%,3$]#0U)!4TA!
M3D1)0T%.0T].0TQ51$4Z251#4D%32$5354Y$15)#5U-$4$U)0E543D]454Y$
M15)724Y$3P`````"`0D0`0```(T"``")`@``I@,``$Q:1G50&K6W_P`*`0\"
M%0*H!>L"@P!0`O()`@!C:`K`<V5T,C<&``;#`H,R`\4"`'!R0G$1XG-T96T"
M AT S/W`N0'$P*`?0J`",\)V0*`IPJ!#;$+8&YG`=`V#?`'"PH440OQ($DG=F74
M('0(@609H&@9D`(0KFP5H`/P%\`@$U!O"<#T86T9H&\9H`>0!4`:$A,`P!IQ
M8R`%`&%S:'8@`'`9\$D<D`.1!:!NUF,*0`VP DOT  AT J%205`'*,-!Y%U'1`$D"!#
M5U-(1%!-'4!B=05`;M9O!4`?5%<+@&0:D`0 AT V#DU+ATQ!T!S&X`@<11I8QGC
M805`:70G?P0@`B`;Y`-P"?`;TB+A8<T<)F8+<"(`("@%L0N`,1H#;F5X!4`<
M-#\I7R*T&A`$`!R5''!C"'!S02&P0E17(#H=,63>:1GR)X$;HQ]<0A'`))"\
M DOT 2P AT 8QH3"X`'0"`6$.QL91S`&9`H&6`:<!R0 DOT 1H AT 8VLBM`M@$]!R*><K,"(1
M`,!Y8AF1&B`6$+\C``0@('`:X@)@$^`_"H5-"H4C"X`=TR`\$\!D0&QI8BYH
M/C`<=BYO*2$`P`N`*";P7'MO"H4T0`N`(O$[,^<S`RH=!3!R-,@"$`7`*&D@
M'#T@%Q`C`#%P(#4P\S>@-S$K*R;P,[HT037!E3;Q*#5D*1PU*#$WH;PP*33(
M.0(%$`(P9B5P$"(E9#H\4%Q<;BHB*S!I*S`H-<$]/:!.54Q,*3KI7!<R-PJS
M/J8*A40#<`N`:7%7"E`H@`B0<P.!<PJ%*/$B$')R>3:#&A(:H3-1V&PN9"+A
M'*%P(K0:5%\$(#SA(R(NH!U@=2R!;]\\$`AA,T(#(!&P<AF`+@`+"H45,0!'
M4`````,`$!```````P`1$`````!```<PP'<'7N,FNP%```@PP'<'7N,FNP$>
1`#T``0````0```!213H`>@,`
`
end

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019