[fpc-pascal]GetMem crazy problem

Alan Mead cubrewer at yahoo.com
Tue Jun 10 21:37:32 CEST 2003


I did not follow your example, but are you aware of the "growing
heap" behavior of FreePascal and the ReturnNilGrowHeapFails variable?


Also, I think this ReturnNilGrowHeapFails behavior is broken in 1.0.6
and fixed in 1.0.7 (which, I think, is not available yet).

But I don't know why you get RTE 201?  (You should be getting 203 or
216 or something)


--- Eduardo Morras <nec556 at ave128.retena.es> wrote:
> Hello:
>          I've got a weird problem with getmem. I have check
> everything (i 
> think) but i can't get it work. Heaptrc says it's all ok, but when
> i 
> de-comment the next three lines ( the freemem also ),  all fails
>       GetMem(sDicc,sizeof(rtBusqBidimen));
>       GetMem(ppmv,sizeof(rtMotionVector));
>       GetMem(nDicc,sizeof(rtBusqBidimen));
>       if (sDicc<>nil) AND (nDicc<>nil) AND (ppmv<>nil) then
>          writeln('MAS MEMORIA PARA VECTORMOTION') // Chequeo de
> memoria 
>         {More Memory for VECTORMOTION //NITIAL memory check}
>       else begin
> ......
> The sizes are 14,8,14, MemAvail says near 48Mb and MaxAvail 47'5. I
> tried  to put them in the program vars (they are in a function),
> change the 
> sizeof (which print on screen 14,8,14) to it's values re-type for a
> misspelling error. Their declartions at var are
> nDicc,sDicc       : prtBusqBidimen;  // p= point r= record t= type
> BusqDimen
> ppmv                 : prtMotionVector;  // id. MotionVector
> When skip the if (sDicc<>nil)... a runtime error 201 appears
> what's the next step??
> Any clues??
> Las personas se dividen en tres grupos, los que saben contar y los
> que no.
>       There are three groups of people, who can count, and who
> cannot.
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal

A Congressman was once asked about his attitude toward whiskey.  "If you mean the demon drink that poisons the mind, pollutes the body, desecrates family life, and inflames sinners, then I'm against it. "

"But if you mean the elixir of Christmas cheer, the shield against winter chill, the taxable potion that puts needed funds into public coffers to comfort little crippled children, then I'm for it."
"This is my position, and I will not compromise."

Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).

More information about the fpc-pascal mailing list