Skip to main content

Questions tagged [allocation]

0 votes
2 answers
304 views

For, e.g. determining an amount of memory that is safe to allocate for processing file or device with this type of I/O loop: HANDLE hFile /* = file open with GENERIC_READ */; LARGE_INTEGER liSize; ...
Govind Parmar's user avatar
16 votes
6 answers
10k views

So, the problem: When I run the same C++ code in Visual Studio, with the same input and parameters, I get either the correct output, or an output that is completely messed up (99% of values go to zero)...
babipsylon's user avatar
1 vote
3 answers
380 views

What is the standard for heap allocation systems in bare metal programs? If there is no standard, what is the most popular one? Is it a free list? If so, are there heuristics that use a hash table of ...
nicholasbelotserkovskiy's user avatar
0 votes
5 answers
296 views

We have a huge amount of queries hitting our API that request a minor or major extract of some huge files lying around on our mounted hard drives. The data needs to be extracted from the files and ...
glades's user avatar
  • 493
6 votes
2 answers
2k views

I'm going through some code from this article about ECS-systems in game programming and trying to understand it, and something I'm seeing a lot is using heap memory in places where it seems like ...
JensB's user avatar
  • 277
0 votes
1 answer
165 views

I was looking at Rust's Allocator trait. From my understanding, you give an allocator a length of memory and a word size to align to, and the allocator either gives you a pointer to the memory or an ...
kkeey's user avatar
  • 111
1 vote
4 answers
1k views

I have a function that repeatedly encodes Foos to string. I'm currently deciding between two ways to implement this: Return by value: std::string encode(const Foo& foo); void important_function() ...
cube's user avatar
  • 157
0 votes
3 answers
265 views

I have learned file memory management and some very simple CPU assembly for manual memory manipulation. Still, I feel like there is a gap in my knowledge when it comes to modern, complex computers, ...
infinity8-room's user avatar
0 votes
4 answers
761 views

I am still quite new on here so I hope I am posting in right forum. I am currently writing a small library where I realized I could use some kind of design pattern which lets one pass constructor ...
mathreadler's user avatar
2 votes
1 answer
124 views

I have a scenario for which I'll take an analogous example to help understand better. There are N buckets of known varying capacities. We have M balls that we need to put in these buckets to fill ...
Varinder Singh's user avatar
16 votes
2 answers
7k views

The following code causes a memory leak: #include <iostream> #include <memory> #include <vector> using namespace std; class base { void virtual initialize_vector() = 0; }; ...
Inertial Ignorance's user avatar
3 votes
7 answers
2k views

I was wondering what would be the best approach to allocate/deallocate multiple one-dimensional, dynamic arrays in C. This seems easy at first, however, for me it turned out to be problematic. ...
MaxPowers's user avatar
  • 141
26 votes
2 answers
9k views

All the sites I go to look for informations on FAT16 just declaratively state that it can not allocate more than 2 GB. OK. Great. I believe you. But how do you come to that conclusion (other than just ...
SangoProductions's user avatar
-2 votes
1 answer
907 views

I am currently reviewing memory partitions and I have a problem that is really confusing me. Suppose you have 5 memory partitions: 100K, 500K, 200K, 300K, and 600K. Also suppose you have 4 ...
Elijah Hampton's user avatar
1 vote
0 answers
490 views

I have the following abstract class which implements the "Allocator" concept, using policies and traits to customize behavior: #define FORWARD_ALLOCATOR_TRAITS(C) \ typedef ...
MattyZ's user avatar
  • 113

15 30 50 per page