www.digitalmars.com         C & C++   DMDScript  

c++ - A Problem when allocating a lot of Memory

Hi,

I have a problem when allocating a lot of Memory (this matches both C and 
C++):

When I allocate a smaller (and free it) and later a greater piece of memory,
where each would fit into the actual remaining memory, but not both,
then the second allocation fails.

This issue occurs only when I use the Digital Mars compiler (v8.42).

I have attached a zipfile including the necessary files and would be glad if
someone could tell me how to get rid of this.

Thanks in advance.

Bernd Feldmann-Raiff



begin 666 testallocate.zip

MS3$.`B$0A>&>A#M,5BH2A&BCG;$P%E;&"XPPN"0L)"-[?W'7QO9]?_*LUG!Z
M<J((#WHWF

M```(`)B+(SE)JY04A ```*P````0````=&5S=&%L;&]C871E+F-P<%7-L0["
M(!2%X9V$=[BI3"0(T44WXV <G(PO<(6+):'0('U_L>W2]7Q_<K24<'F70!Y>
M]*TP8(S9:E^(.(-F/D2"VF &K+2WX[ 03K7/!:Y4DH,;13= 2NJ)P?LE<"V'
M S$G9<[*'/^CYDQ+$'="1T7,F7CDCUB-LUU(-DZ.H-N<]AUG/U!+`P04````
M" "Q424Y*1N7AML"``#H
MXA\FE$8&07  T+1IJH9+E$B(5 U1'YH*V=XQ7M5>H_4Z(:GZ[YU=FW)M2UY:

M+*&+4C"XQ)!%CA#U3P[W_<R D3$T;?NT;K^NVRTM;!0+C2J4K]!A*,O&K#R,


MR#PUB
MAR&X"(MZ,_"Y3)0IUBA62'$<15]98 (THX0)Q,+()$8.%UQ,\\ 4R8\E&MU,
MQE/I1$"]E"JIF8 !2GP#IZ
M._^DT&AHE^-^K]\A:64G:9=/I\_E3!2)EH'8C560.2=4"D5N.NJ"7YV<8H'T

M482,TS%\W,+GP?$FOO9E>W!LX'&A0+?6NH\YH_MW< <O<"14O5J5G>GK3)*5
M;Y4N-8 :7&=(%\G!GK^<9TV]$Q_3)("!(-BE&K6T8ORI;CJB13>]!2MC;9*=
M"WPP*;^0QU=M V&"F<K2\FHE>WU8)N)B%;1!MF"6=W ^NAT.]2*5J-AYG1AG
MNG&ZN:7,H+)&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&%L;&]C871E+FA02P$"% `4````" "R424YNY B

?7VQO9RYH=&UL4$L%! `````$``0`_P```"X(````````
`
end
Sep 05 2008