<HTML>
<div><style> BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }</style>It might be a problem because it's a false error and not exactly clean. Granted, testing such things is not that straightforward. Platforms such as Windows do have a feature where you can tell it to randomly fail memory allocations after about 8 minutes of start time (so the machine can fully boot up) - the trouble is that graphical elements on the desktop stop being rendered properly, among other failures, and you can't predict where an allocation will fail in the program. I think you can put in exceptions so allocations don't fail for Lazarus or the Command Prompt, for example.</div><div><br>
</div><div>The trouble is, these allocation failures are designed for C programs, where "malloc" returns NULL if memory isn't allocated. Free Pascal's GetMem raises an exception instead. Granted, it shouldn't be too much of a struggle to implement a custom memory manager for testing and to cause random (or deterministic) allocation failures to see how cleanly the situation is handled. It could be a fun test suite!</div><div><br>
</div><div>It is times like these that give weight to being careful with memory allocations. I started programming in the mid-90s where memory was still quite tight (namely, a computer running Windows 95 with only 8 MB of RAM!) While computers are very fast and spacious today, the same standards still apply in places, notably in tight loops and functions that get executed very frequently.</div><div><br>
</div><div> Gareth aka. Kit</div><div><br>
</div><br>
<span style="font-weight: bold;">On Mon 30/07/18 19:24 , "Anthony Walter" sysrpl@gmail.com sent:<br>
</span><blockquote style="BORDER-LEFT: #F5F5F5 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT:0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px"><div dir="ltr"><div class="gmail_extra">I thought I'd add a point about compiling and memory. On the Raspberry Pi, I know for a fact that building the compiler can fail after a while <span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">due </span>to insufficient memory. When this happens the problem with no memory doesn't present itself as such. Rather you're left with an error indicating a problem with the source. I've gotten around this problem by making the compiler without a desktop environment running and re configuring the swap size.</div>
<div class="gmail_extra"><br>
</div><div class="gmail_extra">Might this problem be related in some way to the discussion in this thread?</div></div>
_______________________________________________<br>
fpc-devel maillist - <a href="javascript:top.opencompose('fpc-devel@lists.freepascal.org','','','')">fpc-devel@lists.freepascal.org</a><br>
<a target="_blank" href="parse.php?redirect=<a href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</a>"><span style="color: red;">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</span></a><br>
<br>
</blockquote></HTML>