Posts Tagged Heap

Tutorial Java – #9 Managementul memoriei, Garbage Collector si memory leaks

Inca din primele zile ale programarii (prin limbajele masina – assembler), o problema importanta de performanta a fost si inca este, dimensiunea spatiului de memorie disponibil si modul de gestiune al acestuia. In ciuda faptului ca astazi tehnologia hardware ofera resurse mari de memorie virtuala, Random Access Memory, dezvoltatorii de software trebuie sa acorde atentie modului in care aplicatiile gestioneaza memoria, deoarece pot fi implementate solutii gresite, care vor bloca procesul sau sistemul de operare, deoarece nu mai este suficienta memorie virtuala. In alte conditii, este posibil sa sa existe chiar constrangeri hardware si spatiul maxim de memorie disponibila poate fi o specificatie strict tehnica de care se va tine seama la dezvoltarea aplicatiei. Read the rest of this entry »

,

1 Comment

Tutorial Java – #9 Garbage collection and memory leaks

Since the first days of computer programs, one important performance issue was the and still is the amount of used memory. Despite the fact that today the hardware technology provide large amounts of Random Access Memory, software developers must pay attention to how they manage the application memory because they can implement wrong solutions that will crush the process or the machine because they ran out of memory. In other real applications, you may have some hardware constraints and the maximum amount of available memory can be a strict technical specification.

Read the rest of this entry »

,

1 Comment

Tutorial Java – #8 Stiva metodelor si memoria Heap

Pentru a avea o intelegere profunda a progamarii orientate obiect in Java sau in orice alt limbaj orientat obiect (cum ar fi C #),trebuie sa stii cum sunt gestionate lucurile intern de catre procesul Java si de JVM (Java Virtual Machine). Desigur, sintaxa si  implementare principiilor POO (Programare Orientata Obiect) in Java sunt importante, dar vei avea o imagine mult mai clara cu privire la resursele necesare, memorie, performanta, transferul parametrilor, fire de executie si de eliberare a memoriei sau colectare a gunoiului (garbage collection), daca ai iti pui intrebari dincolo de Cum fac asta ? sau Cum scriu asta ?. Intrebari reale trebui sa fie Cum sau De ce se intampla asa ? (desigur, de la un punct, trebuie sa iei lucrurile asa cum sunt si sa mergi mai departe).
In acest tutorial voi descrie modul in care variabilele aplicatiei sunt gestionate, in ceea ce priveste locul unde sunt depozitate (Stack – Stiva sau Heap) si pentru cat timp.
Read the rest of this entry »

, ,

1 Comment

Tutorial Java – #8 Understand Stack and Heap

In order to have a deep understanding of the Object Oriented Programming in Java or any other OOP language (like C#) you must know how things are managed internally by the Java process and by the JVM. Of course Java syntax and Java implementations of OOP principles are important but you will have a more clear image about the application resources, memory, performance, argument passing, threads and garbage collection if you put questions beyond How I do that ? or How I write that ?. The real questions should be How or Why it is happening like this ? (of course, at some point you should stop and move forward).

In this post I will describe how the application variables are managed, regarding where they are stored (Stack or Heap) and for how long.

Read the rest of this entry »

, , ,

12 Comments

How to: Optimize the Memory Space by Heap Memory Allocation in C++

Memory allocation at the applications run-time enables the use of a storage space, expressed in number of bytes, having the size of heap memory required for data storing defined by the variables. Compile-time allocation allows the reservation and use of storage space with predefined size expressed in number of bytes. In this situation, software developers must anticipate the maximum size of memory space that can be used in the application.
Read the rest of this entry »

, , , , , , , , ,

No Comments

How to: Apply the Arithmetic of Pointers and Access the Areas of Heap Memory in C++

Areas of heap memory are accessed via variables of pointer type [...]. This kind of variable manages values of memory address type.
Arithmetic of pointers [...] involves the operators use to access the areas of heap memory. Allocating of heap memory areas is done by functions and/or operators implemented in programming language.
Read the rest of this entry »

, , , , , , , , , ,

No Comments

Gradul de optimizare a spatiului de memorie prin alocarea dinamica a memoriei in C++

Alocarea de memorie la momentul executiei unei aplicatii permite utilizarea unui spatiu de memorie, exprimat in numar de bytes, cu exact dimensiunea de memorie heap necesara pentru stocarea datelor definite prin intermediul variabilelor. Alocarea la momentul compilarii permite rezervarea si utilizarea unui spatiu de memorie cu dimensiune predefinita, exprimata in numar de bytes. In aceasta situatie, dezvoltatorul software trebuie sa anticipeze spatiul de memorie de dimensiune maxima care poate fi utilizat in cadrul aplicatiei.
Read the rest of this entry »

, , , , , , , , ,

No Comments

Definirea si utilizarea variabilelor de tip pointer in C++

Variabilele de tip pointer permit accesarea de zone de memorie cu continut numeric pentru gestionarea valorilor ce reprezinta adrese de memorie. Dimensiunea unei variabile pointer depinde de arhitectura procesorului.

Read the rest of this entry »

, , , , , , , , ,

2 Comments

Aritmetica de pointeri si accesarea zonelor de memorie heap in C++

Zonele de memorie heap sunt accesate prin intermediul variabilelor de tip pointer [...]. Acest tip de variabile gestioneaza valori de tip adresa de memorie.
Aritmetica de pointeri [...] presupune utilizarea operatorilor pentru accesarea zonelor de memorie heap. Alocarea zonelor de memorie heap se realizeaza prin functii si/sau operatori implementati la nivel de limbaj de programare.

Read the rest of this entry »

, , , , , , , , , ,

2 Comments