<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Memory leak with libfat</title>
<description> Hi,

i think i&amp;#039;ve found a bug in libfat. I need to read/write a lot of file on the sd card.

My option is to Mount/Unmount the sd card every time i use/unuse it. After a long time, my memory is full (malloc return me null).
The other option is to Mount the sd at the beginning only. With this method, all is fine.


So i think there is a memory leak in the libfat mounting/unmounting system.....

Does someone has a solution? (for information, i need to use the first method in my final release).</description><link>http://forum.wiibrew.org/read.php?11,44652,44652#msg-44652</link><lastBuildDate>Fri, 12 Jun 2026 09:37:30 +0200</lastBuildDate>
<generator>Phorum 5.2.23</generator>
<item>
<guid>http://forum.wiibrew.org/read.php?11,44652,45927#msg-45927</guid>
<title>Re: Memory leak with libfat</title><link>http://forum.wiibrew.org/read.php?11,44652,45927#msg-45927</link><description><![CDATA[ I haven&#039;t done this simple test :)<br />But here is the code i will put in it:<br /><br /><pre class="bbcode">
u64 pune=0;
while(1)
{
  __io_wiisd-&gt;startup();
  fatMountSimple("sd",  __io_wiisd);
  fatUnmount("sd");
  __io_wiisd-&gt;shutdown();

  void* blablabla = malloc(256);
  if(!blablabla)break;
  free(blablabla);
  printf(".");
  pune++;
}
printf("\nthere is no memory left after %d sd card inits", pune);</pre><br />I will try this test!]]></description>
<dc:creator>arasium</dc:creator>
<category>Coding</category><pubDate>Mon, 04 Jan 2010 13:04:17 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,44652,45864#msg-45864</guid>
<title>Re: Memory leak with libfat</title><link>http://forum.wiibrew.org/read.php?11,44652,45864#msg-45864</link><description><![CDATA[ so if you just do main() with a loop like<br /><pre class="bbcode">
int pune=0;
while (1)
{
initSdCard();
closeSdcard();
blablabla = malloc();
if(!blablabla)break;
free(blablabla);
printf(".");
pune++;
}

printf("\nthere is no memory left after %d sd card inits", pune);</pre><br />you are saying that eventually the loop will break and it will be out of memory?]]></description>
<dc:creator>giantpune</dc:creator>
<category>Coding</category><pubDate>Sun, 03 Jan 2010 15:40:39 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,44652,45860#msg-45860</guid>
<title>Re: Memory leak with libfat</title><link>http://forum.wiibrew.org/read.php?11,44652,45860#msg-45860</link><description><![CDATA[ Go directly bother the guys behind libfat about this: [<a href="http://devkitpro.org" rel="nofollow">devkitpro.org</a>]]]></description>
<dc:creator>Arikado</dc:creator>
<category>Coding</category><pubDate>Sun, 03 Jan 2010 15:13:02 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,44652,45838#msg-45838</guid>
<title>Re: Memory leak with libfat</title><link>http://forum.wiibrew.org/read.php?11,44652,45838#msg-45838</link><description><![CDATA[ anybody?]]></description>
<dc:creator>arasium</dc:creator>
<category>Coding</category><pubDate>Sun, 03 Jan 2010 08:16:55 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,44652,44652#msg-44652</guid>
<title>Memory leak with libfat</title><link>http://forum.wiibrew.org/read.php?11,44652,44652#msg-44652</link><description><![CDATA[ Hi,<br /><br />i think i&#039;ve found a bug in libfat. I need to read/write a lot of file on the sd card.<br /><br />My option is to Mount/Unmount the sd card every time i use/unuse it. After a long time, my memory is full (malloc return me null).<br />The other option is to Mount the sd at the beginning only. With this method, all is fine.<br /><br /><br />So i think there is a memory leak in the libfat mounting/unmounting system.....<br /><br />Does someone has a solution? (for information, i need to use the first method in my final release).]]></description>
<dc:creator>arasium</dc:creator>
<category>Coding</category><pubDate>Fri, 18 Dec 2009 17:21:33 +0100</pubDate></item>
</channel>
</rss>