Re: [PHP-DEV] issue in copying the hash table(Reposted third time)

2004-07-12 Thread Andi Gutmans
Weird, maybe the commit failed. I just commited it again. At 01:25 AM 7/12/2004 -0700, Kamesh Jayachandran wrote: I could not see the patch yet. With regards Kamesh Jayachandran On Sun, 11 Jul 2004 23:26:54 -0700, "Andi Gutmans" <[EMAIL PROTECTED]> said: > You seem to be right. I commited a patch.

Re: [PHP-DEV] issue in copying the hash table(Reposted third time)

2004-07-12 Thread Kamesh Jayachandran
I could not see the patch yet. With regards Kamesh Jayachandran On Sun, 11 Jul 2004 23:26:54 -0700, "Andi Gutmans" <[EMAIL PROTECTED]> said: > You seem to be right. I commited a patch. Please take a look and see if > it > solves your problems. > > At 11:02 PM 7/11/2004 -0700, Kamesh Jayachandran

Re: [PHP-DEV] issue in copying the hash table(Reposted third time)

2004-07-11 Thread Andi Gutmans
You seem to be right. I commited a patch. Please take a look and see if it solves your problems. At 11:02 PM 7/11/2004 -0700, Kamesh Jayachandran wrote: Hi Moriyoshi, Fine. Correcting myself. Only once global_class_table is allocated and each thread just increments the individual zend_class_entry

Re: [PHP-DEV] issue in copying the hash table(Reposted third time)

2004-07-11 Thread Kamesh Jayachandran
Hi Moriyoshi, Fine. Correcting myself. Only once global_class_table is allocated and each thread just increments the individual zend_class_entry while making a copy. In linux I never faced the problem. I can not say it as a problem with NetWare. As per concept trying to copy sizeof(zend_class_e

Re: [PHP-DEV] issue in copying the hash table(Reposted third time)

2004-07-10 Thread Moriyoshi Koizumi
On 2004/07/08, at 19:16, Kamesh Jayachandran wrote: Hi Moriyoshi, Sorry to copy the INIT_DATA macro in the mail. #define INIT_DATA(ht, p, pData, nDataSize) if (nDataSize == sizeof(void*)) { memcpy(&(p)->pDataPtr, pData, sizeof(void *)); (p)->pData = &(p)->pDataPtr; } else { (p)

Re: [PHP-DEV] issue in copying the hash table(Reposted third time)

2004-07-08 Thread Kamesh Jayachandran
Hi Moriyoshi, Sorry to copy the INIT_DATA macro in the mail. #define INIT_DATA(ht, p, pData, nDataSize) if (nDataSize == sizeof(void*)) { memcpy(&(p)->pDataPtr, pData, sizeof(void *)); (p)->pData = &(p)->pDataPtr; } else { (p)->pData =

Re: [PHP-DEV] issue in copying the hash table(Reposted third time)

2004-07-08 Thread Moriyoshi Koizumi
On 2004/07/08, at 14:41, Kamesh Jayachandran wrote: The last parameter sizeof(zend_class_entry) of value say 292 to zend_hash_copy indicate it to dereference the value of one of the hashtable entry. This value is of type zend_class_entry** which when dereferenced once gives rise to zend_class_entry

Re: [PHP-DEV] issue in copying the hash table(Reposted third time)

2004-07-07 Thread Kamesh Jayachandran
Hi Moriyoshi, File: Zend/zend_compile.c Function: do_bind_class zend_class_entry *ce zend_hash_add(class_table, opline->op2.u.constant.value.str.val, opline->op2.u.constant.value.str.len+1, &ce, sizeof(zend_class_entry *), NULL) >From the above zend_hash_add I came to a conclusion that class_tab

Re: [PHP-DEV] issue in copying the hash table(Reposted third time)

2004-07-07 Thread Moriyoshi Koizumi
On 2004/07/08, at 1:04, Kamesh Jayachandran wrote: My question is very simple. Please answer the following question. 1)Zend has global_class_table of type HashTable with a key as the class name ('char*') and value of type 'zend_class_entry**'. True or False? Keys are just strings and associated val

Re: [PHP-DEV] issue in copying the hash table(Reposted third time)

2004-07-07 Thread Kamesh Jayachandran
Hi Moriyoshi, Thanks for replying. My question is very simple. Please answer the following question. 1)Zend has global_class_table of type HashTable with a key as the class name ('char*') and value of type 'zend_class_entry**'. True or False? As I look at the code the above statement seems to be

Re: [PHP-DEV] issue in copying the hash table(Reposted third time)

2004-07-07 Thread Moriyoshi Koizumi
On 2004/07/07, at 14:18, Kamesh Jayachandran wrote: In this case while making a copy og global_class_table to thread specific class_table in a deep fashion. zend_hash_copy has to do the double dereferencing which it can't being a generic fuinction. Sorry, but I don't quite understand what you meant

Re: [PHP-DEV] issue in copying the hash table(Reposted third time)

2004-07-06 Thread Kamesh Jayachandran
Hi All, Can someone clarify me on this?. With regards Kamesh Jayachandran On Mon, 05 Jul 2004 01:25:51 -0700, "Kamesh Jayachandran" <[EMAIL PROTECTED]> said: > Did I make the problem statement clear?. > > With regards > Kamesh Jayachandran > On Mon, 28 Jun 2004 22:57:38 -0700, "Kamesh Jayachandr

Re: [PHP-DEV] issue in copying the hash table(Reposted third time)

2004-07-05 Thread Kamesh Jayachandran
Did I make the problem statement clear?. With regards Kamesh Jayachandran On Mon, 28 Jun 2004 22:57:38 -0700, "Kamesh Jayachandran" <[EMAIL PROTECTED]> said: > Hi Andi, > In Zend/zend.c > function name is compiler_globals_ctor > This function is defined inside the #ifdef ZTS macro > Line of concer

Re: [PHP-DEV] issue in copying the hash table(Reposted third time)

2004-06-28 Thread Kamesh Jayachandran
Hi Andi, In Zend/zend.c function name is compiler_globals_ctor This function is defined inside the #ifdef ZTS macro Line of concern zend_hash_copy(compiler_globals->class_table, global_class_table, (copy_ctor_func_t) zend_class_add_ref, &tmp_class, sizeof(zend_class_entry)); If I am correct our g

Re: [PHP-DEV] issue in copying the hash table(Reposted third time)

2004-06-28 Thread Andi Gutmans
I don't quite understand the question. Can you rephrase what exactly is bothering you? Andi At 03:46 AM 6/28/2004 +0530, Kamesh Jayachandran wrote: Hi All, Sorry to repost for the third time. I want the clarification regarding copying the global_class_table to thread specific compiler_globals->clas