Skip to content

Commit

Permalink
doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
chaz6chez committed Oct 18, 2024
1 parent 14ef8bb commit 74c230e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/doc/utils-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
- `zval` can be simply understood as the PHP stack
- Objects and other data in PHP are represented by `zheap` in C, essentially also residing on the C heap
- In simple terms: with `$a=new stdClass()`, `$a` and the address of `new stdClass()` are stored in `zval`, while `new stdClass()` is stored in `zheap`
- `zheap` can be simply understood as the PHP heap
- `zheap` can be simply understood as the PHP heap. It is a memory block allocated by the Zend memory allocator. `zheap` refers to all structures allocated by the memory allocator, such as `zend_object`.
- For more on PHP heap data recovery strategies, refer to the PHP official documentation on GC and use functions starting with gc for operations
- Stacked coroutines will automatically manage register information and stack data for the context, but heap data is **not concurrently safe** in coroutines
- Object pools provide deep copy operations for PHP heap data with `partial support`
Expand Down
2 changes: 1 addition & 1 deletion docs/doc/utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
- `zval`可以简单理解为PHP栈
- PHP中的对象等数据是在C中以`zheap`体现的,本质上也是在C堆上
- 简单理解:以`$a=new stdClass()`举例,`$a``new stdClass()的地址`保存在`zval`其中,而`new stdClass()`保存在`zheap`
- `zheap`可以简单理解为PHP堆
- `zheap`可以简单理解为PHP堆,是通过zend内存分配器分配的内存块,`zheap`代指所有通过内存分配器分配的结构,如`zend_object`
- PHP堆的相关数据回收策略,可以详见PHP官方文档关于GC部分,可使用gc开头的函数进行操作
- `有栈协程`对于上下文会自动管理`寄存器信息``栈数据`,除此之外的`堆数据`**非协程并发安全**
- 对象池提供了对PHP堆数据的深拷贝操作`不完全支持`
Expand Down

0 comments on commit 74c230e

Please sign in to comment.