PHP 关于Memory函数
2016-04-20 00:00
435 查看
void shmop_close ( int
— Close shared memory block
bool shmop_delete ( int
— Delete shared memory block
成功时返回
int shmop_open ( int
— Create or open shared memory block
key -System's id for the shared memory block
flag - a c w n
mode -The permissions that you wish to assign to your memory segment
size -The size of the shared memory block you wish to create in bytes
On success shmop_open() will return an id that you can use to access the shared memory segment you've created.
string shmop_read ( int
— Read data from shared memory block
Returns the data 或者在失败时返回
int shmop_size ( int
— Get size of shared memory block
Returns an int, which represents the number of bytes the shared memory block occupies.
int shmop_write ( int
— Write data into shared memory block
int memory_get_usage ([ bool
—返回当前分配给你的 PHP 脚本的内存量,单位是字节(byte)。
int memory_get_peak_usage ([ bool
返回分配给你的 PHP 脚本的内存峰值字节数。如果设置为
$shmid)
— Close shared memory block
bool shmop_delete ( int
$shmid)
— Delete shared memory block
成功时返回
TRUE, 或者在失败时返回
FALSE。
int shmop_open ( int
$key, string
$flags, int
$mode, int
$size)
— Create or open shared memory block
key -System's id for the shared memory block
flag - a c w n
mode -The permissions that you wish to assign to your memory segment
size -The size of the shared memory block you wish to create in bytes
On success shmop_open() will return an id that you can use to access the shared memory segment you've created.
FALSEis returned on failure.
string shmop_read ( int
$shmid, int
$start, int
$count)
— Read data from shared memory block
Returns the data 或者在失败时返回
FALSE.
int shmop_size ( int
$shmid)
— Get size of shared memory block
Returns an int, which represents the number of bytes the shared memory block occupies.
int shmop_write ( int
$shmid, string
$data, int
$offset)
— Write data into shared memory block
int memory_get_usage ([ bool
$real_usage= false ] )
—返回当前分配给你的 PHP 脚本的内存量,单位是字节(byte)。
int memory_get_peak_usage ([ bool
$real_usage= false ] )
返回分配给你的 PHP 脚本的内存峰值字节数。如果设置为
TRUE可以获取从系统分配到的真实内存尺寸。 如果未设置,或者设置为
FALSE,仅会报告 emalloc() 使用的内存。
相关文章推荐
- yii2 如何在页面底部加载css和js
- PHP运算符优先级列表
- PHP Header失效的原因分析
- Laravel5开发学生管理系统
- 邮件发送(PHP实现)
- laravel怎么创建一个简单的blog
- 234 countprime
- PHP安全处理之Mcrypt使用总结
- php实现并发处理之curl篇
- php命名空间之前咋办
- H3C STP
- PHP中的_FILE_和_DIR_的区别
- php字符串函数
- php中代码开始标志类型(<?php ?>,<? ?>,<?= ?>,<% %>,<%= %>)
- php分页显示双表查询的内容
- PHP RFI 的小tip
- php 自带函数
- PHP mail() 函数
- 记录一下对TP的研究
- Win7x64系统过TP的一些尝试和目前遇到的问题