<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://fenixdocs.com/skins/common/feed.css?63"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://fenixdocs.com/index.php?action=history&amp;feed=atom&amp;title=Free</id>
		<title>Free - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://fenixdocs.com/index.php?action=history&amp;feed=atom&amp;title=Free"/>
		<link rel="alternate" type="text/html" href="http://fenixdocs.com/index.php?title=Free&amp;action=history"/>
		<updated>2026-05-01T08:54:54Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.10.1</generator>

	<entry>
		<id>http://fenixdocs.com/index.php?title=Free&amp;diff=4662&amp;oldid=prev</id>
		<title>Sandman at 12:46, 29 April 2008</title>
		<link rel="alternate" type="text/html" href="http://fenixdocs.com/index.php?title=Free&amp;diff=4662&amp;oldid=prev"/>
				<updated>2008-04-29T12:46:33Z</updated>
		
		<summary type="html">&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;</summary>
		<author><name>Sandman</name></author>	</entry>

	<entry>
		<id>http://fenixdocs.com/index.php?title=Free&amp;diff=1850&amp;oldid=prev</id>
		<title>Sandman at 15:29, 28 April 2007</title>
		<link rel="alternate" type="text/html" href="http://fenixdocs.com/index.php?title=Free&amp;diff=1850&amp;oldid=prev"/>
				<updated>2007-04-28T15:29:57Z</updated>
		
		<summary type="html">&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;</summary>
		<author><name>Sandman</name></author>	</entry>

	</feed>