global malloc/free replacements
| From: | Sascha Schumann | Date: | Fri, 26 Nov 1999 13:30:08 +0000 |
| Subject: | global malloc/free replacements | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-6918@lists.php.net to get a copy of this message | ||
Hi,
we need to find a way to replace malloc/free calls globally
(everywhere, also in libzend/TSRM).
These must be replaced, because the allocator functions on
most systems are not reentrant. They use a static data
structure to determine the free blocks.
Therefore, all mallocs/frees must go through exactly one set
of functions which must be mutexed. It would be enough, if we
could define the replacement functions in one place (one
header file), but I am not sure where that place would be.
The SAPI modules must determine which replacement functions
to use (threaded web-servers provide these usually), but I
don't think libzend/TSRM include anything from the PHP side.
What we could do is to pass a prefix to libzend/TSRM at
configure time which would be the prefix of the replacement
functions.
Any ideas?
--
Regards,
Sascha Schumann
Consultant