【问题标题】:Delete shared memory with iprm in Linux fails [closed]在 Linux 中使用 iprm 删除共享内存失败 [关闭]
【发布时间】:2015-09-18 23:08:09
【问题描述】:

我正在使用共享内存,并且正在测试内存引用溢出。我的代码有一些问题,我无法删除所有内存段 我正在尝试这样:

ipcs -m
ipcrm -m 360448
ipcs -m

内存段永远不会删除

    ------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status
0x00000000 360448     root       700        2484       2          dest
0x00000000 393218     root       700        8372       2          dest
0x00000000 425987     root       700        4416       2          dest
0x00000000 458756     root       700        2484       2          dest
0x00000000 491525     root       700        2400       2          dest
0x00000000 524294     root       700        12800      2          dest
0x00000000 557063     root       700        5800       2          dest
0x00000000 589832     root       700        144160     2          dest
0x00000000 622601     root       700        24672      2          dest
0x00000000 655370     root       700        34368      2          dest
0x00000000 688139     root       700        9996       2          dest

【问题讨论】:

  • 这和php有什么关系?
  • 使用 php 我正在尝试使用“shmop_delete”删除

标签: php linux ipc shared-memory ipcs


【解决方案1】:

我找到了解决方案。 当共享内存状态为 dest 首先使用 ipcs -mp 列出所有内存段 然后用 kill "lpid number" 删除内存段

【讨论】:

    猜你喜欢
    • 2010-09-28
    • 2018-10-03
    • 2013-05-21
    • 1970-01-01
    • 2013-03-14
    • 2015-05-04
    • 2012-11-02
    • 2011-02-18
    • 2019-11-14
    相关资源
    最近更新 更多