память

Memory fragmentation

As you know, the garbage collector in C# (more precisely, in the CLR) cleans up RAM from time to time, freeing up memory occu ... te a new object, but the object cannot be created. Is it true? There is a feeling that I am wrong in my reasoning, but where?

Dynamic vs Static memory allocation

There is a structure: typedef struct Point { int x; int y; } point_t; What is the best way to create an" instance " ... speed, but not infrequently I see the 2 way. So what's the difference (other than being able to do delete whenever you want)?

What is heap fragmentation?

Please share your experience on the topic. What's it? How to identify it? How to deal with it? Maybe there is something important that you need to pay attention to?

Fragmentation in segmented and paged memory organization

Do I understand correctly that fragmentation in the page model is only possible at the level of virtual memory, as opposed to ... ry? But how is this better than fragmentation at the level of real memory, in any case, you will have to do defragmentation?

Dynamic memory allocation in C

The question will probably seem simple, but not for me. The size is unknown in advance, it all depends on the user's desire. ... w much will need to be added, everything is decided in prime time. Or is everything solved by declaring struct Book** books?

how to free up memory with free()

The class creates a structure and a pointer to it. In the constructor, the necessary memory is allocated for the structure. A ... the structure. How do I do this correctly using the free () function ? if (pData) free(pData->matrix); // это не работает

What is CL in DDR4?

What is the RAM speed today? CL-CAS Latency - delay at CAS... for a pro, maybe it says something. Only... why is the higher t ... . UDP:The expensive DDR4 3200MNz SL15 has a number of "idle" cycles of about 55, and it looks like this figure will grow...

How does memory allocation work in Java?

I'm just starting to learn java, and I don't understand some things. I read that most of the variables are stored in the heap ... ects? So if I create a regular integer variable, it is stored in the heap and I access it by reference? Thank you in advance.

Heap and stack view

What do the heap and stack in RAM physically look like?

C++ Operators, overloading operations

I was told that the memory is not working correctly in this operator, who can tell me what is the "not working correctly"? Ma ... ix(arr1, k, M); for (int i = 0; i < N; i++) { delete[]arr1[i]; } delete[]arr1; return *x; }

What's faster: Dynamic memory allocation vs array, Windows 7 vs Linux

A test is written to measure the speed between dynamic memory allocation and array usage, as well as between Windows 7 64-bit ... gh new and delete are used? Why is Linux faster than Windows 7? PS. Both use the release version with speed optimization.

The program returns the error: "std::bad alloc"

The res() function must take указатель на строку as input and return вектор с типом строки with the size of the length of the ... >result = res(pword); copy(result.begin(), result.end(), ostream_iterator<string>(cout, " ")); return 0; }

How do I trim the [from:to] string in C++ for char[]?

I can't find a way to trim the char [] string, starting from the element with the index k, to the element with the index g. I ... << " " << B << " " << C << std::endl; return 0; } Output to the console: AAAAA BBBB CCC

heap corruption detected after normal block c++

A couple of days ago I started learning c++ and ran into this problem. The goal is to write a program to enter numbers and ca ... nAverage << endl; delete[] input; return 0; } Help, please, half of Google searched, did not find a solution.

Memory in the Task Manager

Here is the code that allocates an array of 6 billion bytes - that's just over 5.5 GB: #define _CRT_SECURE_NO_WARNINGS #inc ... do these numbers mean (each of the 5 columns) and is it possible in the task manager see the 6 GB that the program consumes?

Dictionary in C++ as (Dictionary) in C#

There is a surprisingly fast dictionary in C#, I would like to know if there is such a productive one only in C++ ? I tried i ... is several times lower than that of Dictionary sisharpovsky... P. S: The pair has the form <unsigned int, unsigned int>

C. Why is the dimension of the matrix from the text file not written to memory?And how to do it?

In the program where I did not use the function, but wrote everything in the program body, there were no problems.Everything ... ing\n"); for (i = 0; i < r1; i++) { for (j = 0; j < c2; j++) printf("%3d ", C[i][j]); printf("\n"); } return 0; }

How to allocate memory for a 2-dimensional dynamic array

There is such a class: class Field { public: Field(sf::Vector2<int> size); ~Field(); sf::Vector2<int> ... ду } The problem is that I can't allocate a two-dimensional array in the constructor and nothing else, what is the problem?

How to track a memory leak

I work under Visual Studio. How do I know if a program has a memory leak or not?

Reading bytes/bits from C++memory

I have a file with an int number in it. This means that this file occupies 4 bytes in memory. So, how do I read these 4 bytes ... P.S. I'm sorry if this is a stupid question, I'm just starting in c++, I know how to read and write to a file and that's it.