Re: Re: global HashTables
| From: | brad lafountain | Date: | Thu, 14 Feb 2002 19:57:29 +0000 |
| Subject: | Re: Re: global HashTables | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-80060@lists.php.net to get a copy of this message | ||
Goddamit!!!!!!!!!!!!
that worked.. thanks a bunch man!... I literly have been
tracking that down for 10 friggin hours!!!!!!!
It took me forever just to figure out where it was crashing....
then another forever figureing out why...
I alsways thought that emalloc just allowed
php to keep track of how much memory it was using...
and to do somekinda memory checking to see if stuff was free'd
i didn't know that it acually got rid of it for you on every
script!...
Techincally i don't need to call efree() cause it will do it for me??
now that i know that i can be lazy with all of my emallocs :)
- Brad
--- l0t3k <cshmoove@hotmail.com> wrote:
> Brad,
>
> [snip]
> /* {{{ php_test_init_globals
> */
> static void php_test_init_globals(zend_test_globals *test_globals)
> {
> test_globals->global_hash = emalloc(sizeof(HashTable));
> zend_hash_init(test_globals->global_hash, 0, NULL, delete_friggin_type, 0);
>
> zend_hash_add(test_globals->global_hash, "mykey", strlen("mykey"),
> "myvalue", strlen("myvalue"), NULL);
> }
> /* }}} */
>
> [snip]
>
> shouldnt module globals be malloc'ed as opposed to emalloc'ed. all
> emalloced memory is automagically reclaimed at the end of a request.
>
>
> Brad Lafountain <rodif_bl@yahoo.com> wrote in message
> news:20020214190708.69579.qmail@web9607.mail.yahoo.com...
> > Sorry i forgot to attach the extension
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Send FREE Valentine eCards with Yahoo! Greetings!
> > http://greetings.yahoo.com
>
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
>
__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com