473,387 Members | 1,687 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

maximum size of a program

hello everyone can anyone please tell me is there any limit on the
size of the program you are creating.
i mean i tried to declare an 10000 size long double array and the
compilation error says segmentation fault.
please help me .and also is there anyway to find the digital signature
of an image using c++ or some c++ library.

thank you
mohan gupta
Mar 21 '08 #1
5 2010
On Fri, 21 Mar 2008 02:44:37 -0700, mohangupta13 wrote:
hello everyone can anyone please tell me is there any limit on the size
of the program you are creating. i mean i tried to declare an 10000 size
long double array and the compilation error says segmentation fault.
please help me .and also is there anyway to find the digital signature
of an image using c++ or some c++ library.
You mean like

long double array[10000];

I think you're doing something more to earn the
segmentation fault.

--
OU
Mar 21 '08 #2
mo**********@gmail.com wrote:
hello everyone can anyone please tell me is there any limit on the
size of the program you are creating.
i mean i tried to declare an 10000 size long double array and the
compilation error says segmentation fault.
please help me .and also is there anyway to find the digital signature
of an image using c++ or some c++ library.

thank you
mohan gupta
This isn't an inherent C++ problem, but a system dependent one.

A double is going to be at least 4 bytes, and may be up to 10. If
you're on a 16 bit architecture (64Kb memory size) that won't fit. On
any 32 bit one I know about, it won't be a problem.

Strictly speaking, this is OT, and you should go to a group which is
specific to your system but if you post back details of the system and
the code that produces the problem you'll probably get help.

Andy
Mar 21 '08 #3
mo**********@gmail.com wrote:
hello everyone can anyone please tell me is there any limit on the
size of the program you are creating.
Yes, but that is very system and compiler dependant.

i mean i tried to declare an 10000 size long double array and the
How exactly?
compilation error says segmentation fault.
Are you sure that you got the segfalut during _compiling_? If that's the
case, it's a compiler bug, since the compiler itself shouldn't crash.
please help me .and also is there anyway to find the digital signature
of an image using c++ or some c++ library.
I don't known what you mean by "digital signature of an image", but I'd say
the C++ standard library doesn't offer it.

Mar 21 '08 #4
On 2008-03-21 10:44, mo**********@gmail.com wrote:
hello everyone can anyone please tell me is there any limit on the
size of the program you are creating.
There isn't really a limit on the size but on a modern 32-bit
architecture you only have 2-3 GB virtual memory to play with. An array
of 10000 doubles doesn't even take 1 MB so that should not be a problem.
i mean i tried to declare an 10000 size long double array and the
compilation error says segmentation fault.
If that is the compilation error that would mean that the compiler
crashed, are you sure it is not a run-time error? The most likely cause
of a segfault is that while accessing the array you are accessing an
element outside of the array. Please also note that it might be better
to use std::vector instead of using a raw array.

--
Erik Wikström
Mar 21 '08 #5
On 21 mar, 10:44, mohangupt...@gmail.com wrote:
hello everyone can anyone please tell me is there any limit on the
size of the program you are creating.
It's unspecified, but unless you're compiling on a system with
infinite memory, there's bound to be some limit.
i mean i tried to declare an 10000 size long double array and
the compilation error says segmentation fault.
The compiler segfaulted with something that small. Sounds like
a pretty poor implementation to me.

I have some machine generated C++ of a couple of million lines,
and the compiler (g++) outputs an error message to the effect
that it is out of memory.
please help me .and also is there anyway to find the digital
signature of an image using c++ or some c++ library.
I'm not sure if it's what you mean, but there are several
libraries solutions for calculating different types of digital
signatures. (My own supports MD 5 and all of the SHA
signatures.)

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
Mar 22 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: eggie2486 | last post by:
What is the maximum size of an array? I tried to edit an extremely large array for a magic square, for example, array, and when I ran the program, it would not display the array. I changed the...
8
by: codefixer | last post by:
Hi, I was wondering what factors will influence the maximum buffer sizes for source and destination for memcpy(). Is their any limit to the sizeof the buffer(hardware restricting it ?) OR any...
2
by: Kums | last post by:
What is the maximum permissible size of a database? Is there any limitation. What is the maximum # of tablespace's allowed in a database? Thanks for your response.
5
by: Evangelista Sami | last post by:
hello is there a maximum size that can be allocated by a malloc call? is this defined by the standard? thanks Sami Evangelista
19
by: Jerry | last post by:
I am wondering what is the maximum size of memory that malloc() could handle. Is there any limitation on that? Where am I supposed to get this kind of information? Thank you everybody.
1
by: Hugh O | last post by:
Hi, I am familiar with the option within VB windows forms to load a form via a property setting or code that will display the form in the maximum window size. I am using Visual Studio,Net 2003...
29
by: garyusenet | last post by:
I'm trying to investigate the maximum size of different variable types. I'm using INT as my starting variable for exploration. I know that the maximum number that the int variable can take is:...
3
by: Madmartigan | last post by:
Hello I have the following task but am battling with the final output. How do I keep two different vectors in sync and how would I retrieve the index for the maximum value of one of the vectors??...
2
by: Woody Ling | last post by:
I am now using db2 v8.2 64bits without DPF. I want to create a very large table which is about 1000G and the record length is suitable for 32K page size. I find in the manual that the maximum size...
6
by: fiefie.niles | last post by:
In ASP.Net (VS 2005), is there a way to limit the user to upload a file up to certain size (say, I would like to limit the user to upload at the maximum 1 meg of file) ? Thank you
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.