<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Can I reduce the size of jmp_buf?</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/28215/can-i-reduce-the-size-of-jmp_buf</link><description> 
Hi, 

 
The jmp_buf defined in setjmp.h needs a large buffer, typedef
__int64 jmp_buf[48]; //384 bytes 

 
As we checked in function setjmp/longjmp used by Cortex M0/M3, it
is used to save only few run-time data such as R0, R1, ... 

 
On some platform</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Can I reduce the size of jmp_buf?</title><link>https://community.arm.com/thread/78832?ContentTypeID=1</link><pubDate>Mon, 29 Nov 2010 00:00:30 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:f79ef7b0-7eb3-43e3-a0b9-9215567c4bed</guid><dc:creator>c xhawk</dc:creator><description>&lt;p&gt;&lt;p&gt;
I have to agree with you! Haha ...&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I reduce the size of jmp_buf?</title><link>https://community.arm.com/thread/58923?ContentTypeID=1</link><pubDate>Sun, 28 Nov 2010 23:20:29 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:25baa0a4-932a-4323-8796-3717050e13e3</guid><dc:creator>Mike Kleshov</dc:creator><description>&lt;p&gt;&lt;p&gt;
Since you are considering modifying &lt;b&gt;setjmp/longjmp&lt;/b&gt; shipped
with the build tools, you might as well implement your own
&lt;b&gt;setjmp/longjmp&lt;/b&gt;. This way you&amp;#39;ll be able to optimize them to
the fullest.&lt;br /&gt;
Yes, 384 bytes does seem excessive.&lt;br /&gt;
I don&amp;#39;t know what the minimum required size of &lt;b&gt;jmp_buf&lt;/b&gt; is, but
I think it&amp;#39;s safe to assume that it only needs to be big enough to
hold the data that &lt;b&gt;setjmp&lt;/b&gt; saves.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>