Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 27th, 2007, 1:44 AM   #1
programmingnoob
Hobbyist Programmer
 
Join Date: Feb 2006
Posts: 155
Rep Power: 3 programmingnoob is on a distinguished road
memory - shmid!

so what I did is while coding, I didnt destroy the memory I obtained (using shmget etc you know)

now when I type ipcs, i can see all of them listed...

how do i destroy them?

two problems
1) I dont want to do it one by one by typing ipcrm -m shmid. There are quite a few of them
2) Even that wont work, I suspect it has something to do with how it still might be "attached"

Any simple and plain solution?
programmingnoob is offline   Reply With Quote
Old Mar 27th, 2007, 8:25 AM   #2
kruptof
Professional Programmer
 
kruptof's Avatar
 
Join Date: May 2006
Location: UK - London
Posts: 333
Rep Power: 3 kruptof is on a distinguished road
I think you can destroy anything in RAM by restarting the computer, or pulling the wire out of the wall (latter recommended )


PS
just kidding about pulling the wire out of the wall
__________________
Quote:
When I was young it seemed that life was so wonderful,a miracle, oh it was beautiful, magical.
Now watch what you say or they'll be calling you a radical,a liberal, oh fanatical, criminal. Oh won't you sign up your name,we'd like to feel you're acceptable, respectable, oh presentable, a vegetable
kruptof is offline   Reply With Quote
Old Mar 27th, 2007, 9:17 PM   #3
programmingnoob
Hobbyist Programmer
 
Join Date: Feb 2006
Posts: 155
Rep Power: 3 programmingnoob is on a distinguished road
Quote:
Originally Posted by kruptof View Post
I think you can destroy anything in RAM by restarting the computer, or pulling the wire out of the wall (latter recommended )


PS
just kidding about pulling the wire out of the wall
well you see, i am coding on a remote computer
LOL, so I can do neither
programmingnoob is offline   Reply With Quote
Old Mar 27th, 2007, 9:26 PM   #4
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Are you saying that the material that you have studied to produce these cababilites have failed to disclose to you the methods of returning borrowed resources when you have finished with them? Or, are you saying that you have failed to take advantage of them in the event of unanticiapted (by you) terminations?

I would suggest that you are correct in not accepting, as a solution, the termination of the whole dam' system's execution, however effective that may be. There could be something important going on.

Kruptoff, take a few minutes and evaluate your responses. The fact that a guy didn't manage to get his dick in a girl at the appropriate moment is not germane, nor is the thought of being a rebel (going against established standards?). Some things, perish the thought, must conform or fail.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Mar 27th, 2007, 10:36 PM   #5
programmingnoob
Hobbyist Programmer
 
Join Date: Feb 2006
Posts: 155
Rep Power: 3 programmingnoob is on a distinguished road
Quote:
Originally Posted by DaWei View Post
Are you saying that the material that you have studied to produce these cababilites have failed to disclose to you the methods of returning borrowed resources when you have finished with them? Or, are you saying that you have failed to take advantage of them in the event of unanticiapted (by you) terminations?

I would suggest that you are correct in not accepting, as a solution, the termination of the whole dam' system's execution, however effective that may be. There could be something important going on.
well, you see, i am "returning the borrowed resources" NOW...
but I wasnt doing that quite well earlier, as I was experimenting...
to rephrase, my past is haunting me
programmingnoob is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Heap vs. Stack memory Eric the Red C++ 11 Oct 24th, 2006 7:18 PM
When to use the new keyword in C++? titaniumdecoy C++ 28 Mar 16th, 2006 1:36 PM
Which area of memory does new use? aznluvsmc C++ 11 Nov 5th, 2005 8:37 AM
Pointers in C (Part II) Stack Overflow C 2 Apr 29th, 2005 11:39 AM
Pointers in C (Part I) Stack Overflow C 4 Apr 28th, 2005 8:03 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:25 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC