<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Am 29.09.2010 18:07, schrieb Tim Cas:<br>
<span style="white-space: pre;">&gt; &gt;Perhaps, it might be an idea
to get rid of dynamically allocated<br>
&gt; &gt;path strings, and use arrays instead ? This might vastly
improve<br>
&gt; &gt;performance at cost of memory, I suspect.<br>
&gt; You mean using "char foo[5]" as opposed to "char* foo =
malloc(5)"? I'm not sure what you mean because dynamically allocated
path strings are pretty much arrays (all strings are).<br>
&gt;<br>
&gt; If you do mean using foo[5], then there's no change, only that it
allocates things on the stack, which is much more limited and can have
horrible consequences if an overflow happens. Furthermore, the size is
fixed, meaning that you can't, in this extreme case, use the path
"hello" because it uses 6 characters ("hello" + \0 termination).<br>
</span><br>
yeah, but's it allocated on the stack which normally much faster than a
call to malloc/free.<br>
<br>
-- <br>
Christoph Nelles<br>
<br>
E-Mail&nbsp;&nbsp;&nbsp; : <a class="moz-txt-link-abbreviated" href="mailto:evilazrael@evilazrael.de">evilazrael@evilazrael.de</a><br>
Jabber&nbsp;&nbsp;&nbsp; : <a class="moz-txt-link-abbreviated" href="mailto:eazrael@evilazrael.net">eazrael@evilazrael.net</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ICQ&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 78819723<br>
<br>
PGP-Key&nbsp;&nbsp; : ID 0x424FB55B on subkeys.pgp.net<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; or <a class="moz-txt-link-freetext" href="http://evilazrael.net/pgp.txt">http://evilazrael.net/pgp.txt</a><br>
<br>
<br>
</body>
</html>