<?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>address space overflow with getchar</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/14596/address-space-overflow-with-getchar</link><description> I just added a getchar to a program compiling as an Xsmall memory model with Large Code size. 
 
As soon as I add the getchar, I get an address space overflow in the BIT SPACE. I am not sure what this means and how to approach it&amp;#39;s solution. 
 
Can someone</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: address space overflow with getchar</title><link>https://community.arm.com/thread/109934?ContentTypeID=1</link><pubDate>Mon, 31 Dec 2001 08:44:20 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:3e488468-cb63-48d8-8254-c6126939ced2</guid><dc:creator>Larry Voyer</dc:creator><description>&lt;p&gt;It seems my answer didn&amp;#39;t get posted...here it is again&lt;br /&gt;
&lt;br /&gt;
Only a single BIT of the BIT space is used by getchar. I don&amp;#39;t understand why an overflow is being generated.&lt;br /&gt;
&lt;br /&gt;
I have gotten around the problem by using _geykey() but will have to write my own gets() (since it uses getcgar()) unless I can solve this.&lt;br /&gt;
&lt;br /&gt;
Does someone have the source for the Keil getchar()?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: address space overflow with getchar</title><link>https://community.arm.com/thread/94907?ContentTypeID=1</link><pubDate>Thu, 20 Dec 2001 16:16:52 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c31fa2b0-4c0b-458e-a63d-bae36a80ea4b</guid><dc:creator>Jon Ward</dc:creator><description>&lt;p&gt;Hmmmm,&lt;br /&gt;
&lt;br /&gt;
Is it possible that you told the compiler/linker to use the BIT space for something else AND now that you are trying to use a BIT, there is no space for it?&lt;br /&gt;
&lt;br /&gt;
Take a look at the MAP file and see what&amp;#39;s occupying the BIT space.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Jon&lt;/b&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: address space overflow with getchar</title><link>https://community.arm.com/thread/54053?ContentTypeID=1</link><pubDate>Thu, 20 Dec 2001 12:43:56 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:300972c7-0756-4547-a95e-6150870bf476</guid><dc:creator>Larry Voyer</dc:creator><description>&lt;p&gt;Gee, I&amp;#39;m not sure if your reply was meant to be humorous or pedantic and condecending. The price of asking for help, I guess. I appreciate the time and effort to respond.&lt;br /&gt;
&lt;br /&gt;
I realize I should have provided more detail.&lt;br /&gt;
&lt;br /&gt;
1. The code before inclusion of getchar runs fine.&lt;br /&gt;
&lt;br /&gt;
2. The inclusion of getchar results in a BIT ADDRESS SPACE OVERFLOW.&lt;br /&gt;
&lt;br /&gt;
3. Looking at the map, only one BIT out of the 251&amp;#39;s 00:0020H to 00:007FH BIT space is used.&lt;br /&gt;
&lt;br /&gt;
This is what I don&amp;#39;t understand. I have RAM defined in that area.&lt;br /&gt;
&lt;br /&gt;
If I use _getkey(), the problem goes away and, I guess, I could ignore it. It would be nice to have an insight into why a single BIT usage generated a OVERFLOW.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: address space overflow with getchar</title><link>https://community.arm.com/thread/38187?ContentTypeID=1</link><pubDate>Thu, 20 Dec 2001 03:02:30 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:dafd52e7-c679-451f-b1cf-186a3fc4d2dc</guid><dc:creator>Andrew Neil</dc:creator><description>&lt;p&gt;If you try to fit a quart into a pint pot [1], it won&amp;#39;t fit - it will &lt;i&gt;overflow&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
The same principle applies to processor memory:&lt;br /&gt;
Any processor has only a finite memory capacity; if you try to put in more data than the available capacity, it will &lt;i&gt;overflow&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Possible solutions are:&lt;br /&gt;
&lt;b&gt;1.&lt;/b&gt; Increase the capacity;&lt;br /&gt;
&lt;b&gt;2.&lt;/b&gt; Reduce the data.&lt;br /&gt;
&lt;br /&gt;
In the case of the BIT space, the capacity is fixed by the processor architecture, so &lt;b&gt;1&lt;/b&gt; is not an option;&lt;br /&gt;
You will therefore have to reduce your usage of BIT space.&lt;br /&gt;
&lt;br /&gt;
The Linker listing (or &amp;quot;map&amp;quot;) file shows your memory usage.&lt;br /&gt;
&lt;br /&gt;
[1] 1 Quart = 2 Pints - about a litre.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>