Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > When a program crashes, is its memory reclaimed by the OS?

Reply
Thread Tools

When a program crashes, is its memory reclaimed by the OS?

 
 
D'artagnan
Guest
Posts: n/a
 
      05-23-2006
Dynamically allocated (malloc) memory is returned back to the OS when a

program terminates normally. But what if the program crashes? Is its
heap also freed? Thanks.

 
Reply With Quote
 
 
 
 
Luke Meyers
Guest
Posts: n/a
 
      05-23-2006
D'artagnan wrote:
> Dynamically allocated (malloc) memory is returned back to the OS when a
>
> program terminates normally. But what if the program crashes? Is its
> heap also freed? Thanks.


That depends entirely on the OS. The C++ standard has nothing to say
on the matter -- wrong jurisdiction. However, generally speaking, yes,
most OSes will reclaim all such memory.

Luke

 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Its a bird, its a plane, its.. um, an Attribute based System? thunk Ruby 14 04-03-2010 10:08 AM
Its a bird, its a plane, its.. um, an Attribute based System? thunk Ruby 0 04-01-2010 10:25 PM
Its a bird, its a plane, no ummm, its a Ruide thunk Ruby 1 03-30-2010 11:10 AM
How to compare the speed between a Java program and its originalFortran version program? www Java 2 04-11-2007 06:37 AM
What Windows program will convert MPEG2 video to MPEG4 retaining its playback aspect ratio and its video resolution? Dima DVD Video 0 01-24-2005 07:14 AM



Advertisments