Thanks for your lightening response.

Even I thought of this idea
 - Isolate pairs like 
   - my_malloc and my_free
   - Innodb pair: ut_malloc and ut_free

But if pointers are passed between InnoDB and MySQL or MySQL and clients, then the 
memory consumer should free it using my wrapper and not system defined free. 

Is there such communication or all pointers allocated by one modules stays with in it 
and gets freed by the module.

Thanks,
Sp.Raja

> ------------Original Message------------
> From: Sasha Pachev <[EMAIL PROTECTED]>
> To: Chris Nolan <[EMAIL PROTECTED]>
> Cc: "Sp.Raja" <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
> Date: Tue, Feb-17-2004 6:55 PM
> Subject: Re: MySQL Memory
> 
> Chris Nolan wrote:
> > Hi!
> > 
> > You'll want to look through the MySQL C API docs. There are specific 
> > calls for allocating certain structures that MySQL client software 
> > should use (and routines for deallocating it as well).
> > 
> > Regards,
> > 
> > Chris
> > 
> > Sp.Raja wrote:
> > 
> >> Hi List,
> >>
> >> I want to use some other memory allocator routine other than malloc in 
> >> MySQL/InnoDB 4.0.15a.
> >> Does MySQL call malloc directly? or thru wrappers? If it is through 
> >> wrappers then my job will be much simpler, If so please give me the 
> >> list of wrappers.
> 
> You can force MySQL client to allocate using your own routines if you get the 
> client source,replace my_malloc() and my_free() (see mysys/my_alloc.c), and link 
> your code against your modified version. In fact, you could even do it for the 
> server.
> 
> 
> -- 
> Sasha Pachev
> Create online surveys at http://www.surveyz.com/
> 



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to