This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add -feliminate-malloc to enable/disable elimination of redundant malloc/free pairs


On Wed, May 09, 2012 at 05:48:25PM +0800, Dehao Chen wrote:
> > So why not use an alternate interface into this special allocator for this
> > purpose?
> 
> There can be the following scenario:
> 
> We want to add a module to an existing app. Before implementing the
> module, we want to collect some statistics on real runs. In this
> scenario, we need:
> 
> * No change to the legacy code
> * Optimized build for the simulation run
> * Provide accurate statistical info
> 
> We want to collect data for both new module and the legacy code
> without changing the later, thus we cannot use a new malloc/free
> interface.

Note that even in the glibc testsuite there had to be workarounds for this
(asm barrier was used):
http://sources.redhat.com/ml/libc-alpha/2012-05/msg00138.html

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]