Operating System - HP-UX
1819871
Members
2486
Online
109607
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-14-2001 02:16 AM
тАО06-14-2001 02:16 AM
shmat()
I remenber that my program worked well the first time, but failed several times later.
I guess that the problem is that only shmget() shmat() and shmdt() are performed, but shmctl() is not. Ultimately the resource runs out.
But how can I remove this memory "garbage" ?
I use "ipcrm -m" to remove these shared memory and reboot the system, but the problem is still there.
I guess that the problem is that only shmget() shmat() and shmdt() are performed, but shmctl() is not. Ultimately the resource runs out.
But how can I remove this memory "garbage" ?
I use "ipcrm -m" to remove these shared memory and reboot the system, but the problem is still there.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-14-2001 04:48 AM
тАО06-14-2001 04:48 AM
Re: shmat()
shmctl(free) makes all shared memory free
never give up
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-14-2001 04:49 PM
тАО06-14-2001 04:49 PM
Re: shmat()
ravi:
What did you mean ?
int shmctl(int shmid, int cmd, struct shmid_ds *buf);
There are only IPC_STAT IPC_SET IPC_RMID SHM_LOCK SHM_UNLOCK for cmd. Where is free ?
What did you mean ?
int shmctl(int shmid, int cmd, struct shmid_ds *buf);
There are only IPC_STAT IPC_SET IPC_RMID SHM_LOCK SHM_UNLOCK for cmd. Where is free ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2001 04:59 PM
тАО06-15-2001 04:59 PM
Re: shmat()
No, here's what you want to do:
struct shmis_ds dummy;
int my_shmid; /* I assume you have done a shmget to get the shared memory identifier*/
result = shmctl(my_shmid,IPC_RMID,&dummy);
This will only work if you have the proper permissions (super-user or shm segment owner)
Regards, Clay
struct shmis_ds dummy;
int my_shmid; /* I assume you have done a shmget to get the shared memory identifier*/
result = shmctl(my_shmid,IPC_RMID,&dummy);
This will only work if you have the proper permissions (super-user or shm segment owner)
Regards, Clay
If it ain't broke, I can fix that.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP