Posted by Mike Willbanks on 06/05/05 17:31
Sebastian,
> But, in case the table has a lot of rows to process, the script halt
> with 'out of memory' error. Studying the problem I realized that GMP
> functions didn't free memory and continue allocate memory in every
> function pass. There is no gmp_free() in php manual.
>
> Is there any workaround to avoid the problem?
You could always unset the variable after you are done with it. This
should have the garbage collector come through and fix that issue.
It's pretty much like reading a csv file... You should only read the
data in parts and process it in parts.
Also you should be able to modify the extension to add in gmp_free() if
it is an open source project. It is really not to hard. Zend has a
great tutorial on this.
Mike
[Back to original message]
|