Need help on memory allocation when developing an extension
| From: | Zhuguo Shi | Date: | Sun, 18 Jan 2009 01:50:43 +0000 |
| Subject: | Need help on memory allocation when developing an extension | ||
| Groups: | php.pecl.dev | ||
| Request: | Send a blank email to pecl-dev+get-6061@lists.php.net to get a copy of this message | ||
Hello to every one,
This is my first time to be here and I am doing some work with PHP
extensions.
I am new to this field and I have one question, please allow me to
explain more specifically.
Actually I am developing a PHP extension with C++, and it has to read
data from a file every time it receives a request. So I wonder if I can put
the initialization of that class into the extension's MINIT, including the
reading data from file, so that it does not need to open and read file every
time it performs its function.
The reason why I want to do this is to reduce the IO time and increase
its performance. If that is possible, can any one point out the key steps
that I should do? If not, can some one give me some advices?
Any help is of great appreciation, and thanks in advance~
Regards,
Shi Zhuguo