<?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>memory allocation with new operator and program not working</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/23754/memory-allocation-with-new-operator-and-program-not-working</link><description> 
I&amp;#39;m using Real View C++ compiler and I want to use dynamic
creation of object. 

 
This code works fine: 

 
 CSomeObject * p_obj;

 CSomeObject obj;
 p_obj = &amp;amp;obj;
 

 
but this not: 

 
 CSomeObject * p_obj = new CSomeObject;
 

 
I don&amp;#39;t know why</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: memory allocation with new operator and program not working</title><link>https://community.arm.com/thread/100936?ContentTypeID=1</link><pubDate>Thu, 31 Jul 2008 07:58:18 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:0b86e0e7-833e-4e86-a0b4-aaf72671ce67</guid><dc:creator>Robert McNamara</dc:creator><description>&lt;p&gt;&lt;p&gt;
Yes&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: memory allocation with new operator and program not working</title><link>https://community.arm.com/thread/76540?ContentTypeID=1</link><pubDate>Thu, 31 Jul 2008 05:08:37 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:abeb80b3-0408-4304-99b2-e36e90880faa</guid><dc:creator>Aleks Schneider</dc:creator><description>&lt;p&gt;&lt;p&gt;
I&amp;#39;m new to ARM.&lt;br /&gt;
How to define heap?&lt;/p&gt;

&lt;p&gt;
Is it enough to change Heap_Size in Startup file?&lt;br /&gt;
(I&amp;#39;m using LPC2148 microcontroler)&lt;/p&gt;

&lt;pre&gt;
;// &amp;lt;h&amp;gt; Heap Configuration
;//   &amp;lt;o&amp;gt;  Heap Size (in Bytes) &amp;lt;0x0-0xFFFFFFFF&amp;gt;
;// &amp;lt;/h&amp;gt;

&lt;b&gt;Heap_Size       EQU     0x00001000&lt;/b&gt;

                AREA    HEAP, NOINIT, READWRITE, ALIGN=3
__heap_base
Heap_Mem        SPACE   Heap_Size
__heap_limit
&lt;/pre&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: memory allocation with new operator and program not working</title><link>https://community.arm.com/thread/52137?ContentTypeID=1</link><pubDate>Tue, 29 Jul 2008 05:39:53 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:90ad3033-5f30-4815-8972-600fef28784d</guid><dc:creator>Robert McNamara</dc:creator><description>&lt;p&gt;&lt;p&gt;
In what way does it not work?&lt;/p&gt;

&lt;p&gt;
Do you have any heap space defined?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>