<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://fenixwiki.booleansoup.com/skins/common/feed.css?63"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Free - Revision history</title>
		<link>http://fenixwiki.booleansoup.com/index.php?title=Free&amp;action=history</link>
		<description>Revision history for this page on the wiki</description>
		<language>en</language>
		<generator>MediaWiki 1.10.1</generator>
		<lastBuildDate>Fri, 01 May 2026 10:41:33 GMT</lastBuildDate>
		<item>
			<title>Sandman at 12:46, 29 April 2008</title>
			<link>http://fenixwiki.booleansoup.com/index.php?title=Free&amp;diff=4662&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;/p&gt;

			&lt;table border='0' width='98%' cellpadding='0' cellspacing='4' style=&quot;background-color: white;&quot;&gt;
			&lt;tr&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;Revision as of 12:46, 29 April 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 69:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 69:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;End&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;End&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;Used in example: [[alloc]](), [[memset]](), [[memsetw]](), [[sizeof]](), [[say]](), [[pointer]]&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;Used in example: [[alloc]](), [[memset]](), [[memsetw]](), [[sizeof]](), [[say&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;]](), [[free&lt;/ins&gt;]](), [[pointer]]&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;{{Funcbox&lt;/ins&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;  | category = Memory&lt;/ins&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;}}&lt;/ins&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</description>
			<pubDate>Tue, 29 Apr 2008 12:46:33 GMT</pubDate>			<dc:creator>Sandman</dc:creator>			<comments>http://fenixwiki.booleansoup.com/index.php/Talk:Free</comments>		</item>
		<item>
			<title>Sandman at 15:29, 28 April 2007</title>
			<link>http://fenixwiki.booleansoup.com/index.php?title=Free&amp;diff=1850&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:functions]]&lt;br /&gt;
[[Category:memory]]&lt;br /&gt;
&lt;br /&gt;
==Definition==&lt;br /&gt;
'''INT''' free ( &amp;lt;'''VOID POINTER''' data&amp;gt; )&lt;br /&gt;
&lt;br /&gt;
Frees a block of memory.&lt;br /&gt;
&lt;br /&gt;
The pointer used must be a pointer to a previously allocated block of memory, else the behavior of free() is undefined.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
{|&lt;br /&gt;
| '''VOID POINTER''' data || - Pointer to the block of memory to be freed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
'''INT''' : [[true]]&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program example;&lt;br /&gt;
Private&lt;br /&gt;
    byte pointer pbyte;&lt;br /&gt;
    word pointer pword;&lt;br /&gt;
    int  pointer pint;&lt;br /&gt;
    int elements = 10;&lt;br /&gt;
    int i;&lt;br /&gt;
Begin&lt;br /&gt;
&lt;br /&gt;
    // Allocate memory&lt;br /&gt;
    pbyte = alloc(elements);&lt;br /&gt;
    pword = alloc(elements*sizeof(word));&lt;br /&gt;
    pint  = alloc(elements*sizeof(int));&lt;br /&gt;
&lt;br /&gt;
    // Reset memory to 0's&lt;br /&gt;
    memset (pbyte,0,elements);&lt;br /&gt;
    memsetw(pword,0,elements); // same as  memset(pword,0,elements*sizeof(word));&lt;br /&gt;
                               // because value-parameter is 0.&lt;br /&gt;
    memset (pint ,0,elements*sizeof(int)); // There isn't a &amp;quot;memseti()&amp;quot;, so we need to&lt;br /&gt;
                                           // set the individual bytes to 0. To change&lt;br /&gt;
                                           // ints to nonzero values, memset() can't be&lt;br /&gt;
                                           // used easily&lt;br /&gt;
&lt;br /&gt;
    // Write numbers to bytes and ints&lt;br /&gt;
    for(i=0; i&amp;lt;elements; i++)&lt;br /&gt;
        pbyte[i]  = 133; // pbyte[i] is the same as *(pbyte+i)&lt;br /&gt;
        *(pint+i) = 4555; // pint[i] is the same as *(pint+i)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
	// Write numbers to words&lt;br /&gt;
	memsetw(pword,345,elements);&lt;br /&gt;
&lt;br /&gt;
    // Show numbers&lt;br /&gt;
    for(i=0; i&amp;lt;elements; i++)&lt;br /&gt;
        say(&amp;quot;byte[&amp;quot;+i+&amp;quot;] = &amp;quot; + *(pbyte+i));&lt;br /&gt;
        say(&amp;quot;word[&amp;quot;+i+&amp;quot;] = &amp;quot; + pword[i]);&lt;br /&gt;
        say(&amp;quot;int [&amp;quot;+i+&amp;quot;] = &amp;quot; + pint[i]);&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    Repeat&lt;br /&gt;
        frame;&lt;br /&gt;
    Until(key(_esc))&lt;br /&gt;
&lt;br /&gt;
    // Free the used memory&lt;br /&gt;
    free(pbyte);&lt;br /&gt;
    free(pword);&lt;br /&gt;
    free(pint);&lt;br /&gt;
&lt;br /&gt;
End&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Used in example: [[alloc]](), [[memset]](), [[memsetw]](), [[sizeof]](), [[say]](), [[pointer]]&lt;/div&gt;</description>
			<pubDate>Sat, 28 Apr 2007 15:29:57 GMT</pubDate>			<dc:creator>Sandman</dc:creator>			<comments>http://fenixwiki.booleansoup.com/index.php/Talk:Free</comments>		</item>
	</channel>
</rss>