<br><div class="gmail_quote">2012/1/27 Марк Коренберг <span dir="ltr"><<a href="mailto:socketpair@gmail.com">socketpair@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
For example, in nla_parse_nested(), last argument (struct nla_policy *policy) may be decalred as "const struct nla_policy * policy".<br>It will allow me to write<br><br><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<font face="'courier new', monospace">static const struct nla_policy my policy {<br>...<br>}</font></blockquote><br>and gcc will place this memory in read-only memory segment instead of writable one. Also, const items are subjects for optimisations in gcc.</blockquote>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888"><br>
<br>-- <br>Segmentation fault<br><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Segmentation fault<br>