<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Function Block internal memory allocation</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/3784ee32ed/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/3784ee32ed/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/3784ee32ed/</id><updated>2020-02-27T23:26:30.775000Z</updated><subtitle>Recent posts to Function Block internal memory allocation</subtitle><entry><title>Function Block internal memory allocation</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/3784ee32ed/?limit=25#0e3d" rel="alternate"/><published>2020-02-27T23:26:30.775000Z</published><updated>2020-02-27T23:26:30.775000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.com20645cdead2c94a87f54004d7ce41da9edbf9d68</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;no arrays are not dynamic as it must know the size beforehand to write other arrays next to it.&lt;br/&gt;
however you can do it on a usb stick or other memory. Here they are cut in pieces and you could do the same, but it is not advicable.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Function Block internal memory allocation</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/3784ee32ed/?limit=25#9406" rel="alternate"/><published>2020-02-27T23:26:26.172000Z</published><updated>2020-02-27T23:26:26.172000Z</updated><author><name>chadp</name><uri>https://forge.codesys.com/u/chadp/</uri></author><id>https://forge.codesys.comef7b87a66aa32696eea9b950f7badda9311754f5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Im on a Wago 750-873 if that matters...&lt;/p&gt;
&lt;p&gt;I have a 'Logger' function block with some actions... push(new), pop(last), index(number), and a good amount of memory utilized as arrays. My "issue" is declaring the size of my Logger. It seems arrays don't like to be created dynamically, but using a constant means I have to create a 'Logger' function block for each potential sized Log (one class for 200 logs, one class for 500 logs,...)&lt;/p&gt;
&lt;p&gt;Is there any way (without using malloc), that I could work this out in the declaration and call some kind of constructor that sets the logger size. I think not, but it would be a lot cooler if I could &lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>