Archived

This topic is now archived and is closed to further replies.

CProgrammer

Exceeding memory

Recommended Posts

tHiSiSbOb    463
Well, It is probably very hard to do (taking virtual memory into cosideration), but would probably give you an error message (unless your system became so unstable that it crashes).

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
malloc will return a NULL pointer (cannot allocate) and the new operator will throw and exception when it cannot allocate.

The reasons are many fold as to why an allocation may fail, but the most common senario is out of memory.

If I remember correctly, Windows CE would issue a LOW_MEMORY message to the application via GetMessage function. However, functionality such as this is very uncommon and pretty much non existant on systems that support virtual memory.



Share this post


Link to post
Share on other sites
antareus    576
quote:
Original post by smart_idiot
I''m not sure what happens when you run out of stack space.

A structured exception is thrown on Win32 I believe.

Share this post


Link to post
Share on other sites