Segmentation fault in C++

Reply

Join Date: Dec 2006
Posts: 1
Reputation: willy2511 is an unknown quantity at this point 
Solved Threads: 0
willy2511 willy2511 is offline Offline
Newbie Poster

Segmentation fault in C++

 
0
  #1
Dec 5th, 2006
Hi,
I've got a "Segmentation Fault" error in C++ when trying to allocate a vector with a dimension of 2 million. I'm using the library "memory.h"
Any help is welcome
willy
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,541
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 704
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: Segmentation fault in C++

 
0
  #2
Dec 5th, 2006
>I've got a "Segmentation Fault" error in C++ when trying to allocate a vector with a dimension of 2 million.
2 million what? Chances are good you're exceeding the limits of a single allocation request. But it's hard to say without seeing some code.
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 5,050
Reputation: John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold 
Solved Threads: 331
Moderator
John A's Avatar
John A John A is offline Offline
Vampirical Lurker

Re: Segmentation fault in C++

 
0
  #3
Dec 5th, 2006
Originally Posted by willy2511 View Post
Hi,
I've got a "Segmentation Fault" error in C++ when trying to allocate a vector with a dimension of 2 million.
Mmm... not enough memory? If that's not it, try posting some code (or at least the part where the error occurs). Thanks.
"Technological progress is like an axe in the hands of a pathological criminal."
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5,851
Reputation: Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute 
Solved Threads: 749
Team Colleague
Salem's Avatar
Salem Salem is offline Offline
Void main'ers are DOOMed

Re: Segmentation fault in C++

 
0
  #4
Dec 6th, 2006
> I'm using the library "memory.h"
Now what stone-age-16-bit fossil are you using perchance?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC