home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c++.moderated      Moderated discussion of C++ superhackery      33,346 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 32,978 of 33,346   
   Dave Harris to All   
   Re: Sequence container capacity after ca   
   07 Apr 13 05:38:10   
   
   From: brangdonj@googlemail.com   
      
   In article , pasa@lib.hu (Balog Pal)   
   wrote:   
   > > Given that the user requested heap-based by using operator new(),   
   > > it would arguably be a bug for the compiler to presume it knew   
   > > better.   
   >   
   > Err, it knows better what exactly?   
      
   Knows better whether the memory should come from heap or stack.   
      
   > We were talking about cases where the object was just constructed,   
   > destructed, and in between only operations that the compiler can   
   > figure out the end result at compile time.   
      
   I thought we were talking about replacing heap allocation with stack   
   allocation, not eliminating allocation altogether.   
      
   Even if heap allocations were not considered observable, that   
   shouldn't give the compiler license to replace heap allocation with   
   stack allocation. Which is what the earlier poster was concerned   
   about.   
      
   -- Dave Harris, Nottingham, UK.   
      
      
   --   
         [ See http://www.gotw.ca/resources/clcm.htm for info about ]   
         [ comp.lang.c++.moderated.    First time posters: Do this! ]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca