alex writes:
 > 
 > 
 > 
 > By the way it seems to me that in 3.23.XX series mysql_init() returns address not
 > of the starting point of the allocated memory pool but a point somewhere further
 > (like to provide hidden data not included in "official" MYSQL structure). Hence
 > when trying to use static MYSQL structure you can get #GP exception or some data
 > loss as real connect is trying to write somewhere beneath the starting point. This
 > trick is used for objects initializing in C++ runtime etc.
 > 
 > I just wonder if tis so or that's all from my sick imagination? :0)
 > 
 > Alexander Komratov
 > 
 > 


Hi!

Both mysql client API and server have it's own ways of allocating
memory.

But that memory is allocated from OS itself, so there is nothing
wrong. 

You may use static variables, but in that case you have to have a
separecte struct for each of the connections. In any case mysql_init
must be called first.

It is truly a programmers choice. I still think that a best way to do
it is with MySQL++, by keeping all objects local. In that case
compiler itself takes care of all memory allocation / deallocation.


Regards,

Sinisa

      ____  __     _____   _____  ___     ==  MySQL AB
     /*/\*\/\*\   /*/ \*\ /*/ \*\ |*|     Sinisa Milivojevic
    /*/ /*/ /*/   \*\_   |*|   |*||*|     mailto:[EMAIL PROTECTED]
   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*|     Larnaka, Cyprus
  /*/     /*/  /*/\*\_/*/ \*\_/*/ |*|____
  ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^
             /*/             \*\                Developers Team

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to