943,838 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 1205
  • C++ RSS
Dec 5th, 2006
0

Segmentation fault in C++

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
willy2511 is offline Offline
1 posts
since Dec 2006
Dec 5th, 2006
0

Re: Segmentation fault in C++

>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.
Administrator
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Narue is offline Offline
11,807 posts
since Sep 2004
Dec 5th, 2006
0

Re: Segmentation fault in C++

Click to Expand / Collapse  Quote originally posted by willy2511 ...
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.
Team Colleague
Reputation Points: 2240
Solved Threads: 338
Vampirical Lurker
John A is offline Offline
5,055 posts
since Apr 2006
Dec 6th, 2006
0

Re: Segmentation fault in C++

> I'm using the library "memory.h"
Now what stone-age-16-bit fossil are you using perchance?
Team Colleague
Reputation Points: 5862
Solved Threads: 950
Posting Sage
Salem is offline Offline
7,164 posts
since Dec 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: HTTP & Telnet Data Interpreter Component/Control in VC++?
Next Thread in C++ Forum Timeline: Any Help Appreciated, Stumped on HW questions





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC