If you wrote a C program with no pointers -


If you have written a program with an indicator, then this means how much memory can the program consume? If not, in other ways, can you consume more memory than the amount / type of variables present in your code?

In addition, how much does the indicator use?

- Edit -

I feel that a lot has come in the answer

You are limited to the size pile If you do not use dynamic allocation

Does this mean that if you have dynamic allocation then the system / compiler will increase your stack / as soon as you go?

--EDIT # 2

When I said "how much memory the full range of ...", the program does not have unlimited memory with indicator (But how sweet it would be?), But what I meant was the amount of memory that the program can consume quantitatively as a finite number, or for the memory allocation for variables in other ways. Other ways to continue to grow from the amount are @ Dies Ecklin and @Walick reported that recurrence could be a cause of memory to increase dynamically.

Apparently it seems that the creation of such memory is a memory usage limited by its architecture, but it

"text">

If you write the program without dynamically assigning any memory (fully viable and very common), but you By the compiler and / or the environment, your program will be limited to the size stack size.

If you want to use more memory than you have available through the stack and do not want to use dynamic memory (see madness ), then you can change the variable You can store and write in the temporary file and read it as if it had a buffer in memory, the only issue with it is that if you do actually < / B> If you do not want to use pointers, you enjoy In fact, you can not open a file! (A cross-platform, standard-compliance, the path of a good programmer) A standard library function returns a FILE * for use with the fopen file operation task.

Oh, and to answer your question how big a pointer is:

It depends.

Most common operating systems will have 32-bit pointers in 32-bit systems (4 bytes) and 64-bit systems will have 64-bit pointers (8 bytes)

You always have How big can you get on your system by typing a small test program: #include & lt; Stdio.h & gt; Int main (int argc, char * argv []) {printf ("% zu \ n", sizeof (zero *)); Return 0; Dynamic memory management uses something other than a stack space called 'Hep'. The pile can be dynamically allocated to any size (limited by system parameters), but clearly all the memory allocated on the pile calls to malloc / free Combinations should be distributed using the programmer to give more responsibility with dynamic memory management, but it is also more likely to screw up with things like access to free memory and suspending signals. .

This is one of the biggest things that are caught with the new C programmer. (Usually dynamic 3D arrays such as non-simple malloc s and such)

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -