Questions tagged [memory-allocation]
The memory-allocation tag has no usage guidance.
14
questions with no upvoted or accepted answers
7
votes
0
answers
628
views
When there's no memory, should malloc or read/write fail?
To my surprise, I recently found out that Windows would fail a large memory allocation even if little of said memory is to actually be used, e.g. even if you don't want the swap, you better not ...
3
votes
0
answers
34
views
Rearrange items in order reduce fragmentation and reduce wasted space
I have a segment with some offsets at irregular intervals
There are items of various length inside. Items cannot be placed randomly. Instead, their left side must match some offset.
Items are free ...
2
votes
1
answer
176
views
Constant-time adding an element?
Is a computer with infinite memory and infinite word size a Turing machine equivalent (in the sense that polynomial time remains polynomial time and exponential time remains exponential time) if we ...
2
votes
0
answers
35
views
Sweeping integrated into memory allocation: Why only fixed size objects?
In our language design book, it is mentioned that GC sweep can be integrated into allocation, such that when you call malloc for example, you sweep until you find a ...
1
vote
0
answers
27
views
Addresses with no memory allocated
I've read that a program can crash if it tries to access addresses with no memory allocated. But, how is it possible that an address has no memory allocated? When does it happen?
0
votes
0
answers
19
views
Data structure for arguments in Arrow functions in JS
As per the rules of JS, Arrow functions don't have an argument Object, like a regular function inside JS.
But it is also true, that we can pass arguments to the <...
0
votes
1
answer
52
views
Memory allocation algorithm over a growing storage
I am going to story data in a growable persistent storage. I need to implement allocation/deallocation (like malloc/free and possibly realloc but in Rust) of continuous regions of memory on this ...
0
votes
0
answers
49
views
How do you work out the segmentation table, offset and frame size in segmented memory management?
If I had a process, 1, which has the following segments:
Segment 1 - 50 bytes
Segment 2 - 200 bytes
Segment 3 - 90 bytes
and I know that the total bytes in memory is 1024, how do I work out the offset/...
0
votes
0
answers
57
views
memory management - interview question
I was asked the following question in an interview and I don't understand what is the best solution for it -
Assume you have an application that needs memory. It asks for a program for this memory, 20 ...
0
votes
0
answers
17
views
Can I have 2 free adjacent nodes in the fit algorithm for data management
so I know we can have 2 busy adjacent nodes for the fit algo since there'll always be free memory available, but what about when it comes to 2 free adjacent nodes? Is it possible to have 2 adjacent ...
0
votes
0
answers
74
views
Concurrent Garbage-Collectiong/Compacting Memory Allocator
I'm developing an algorithm for concurrent heap garbage collection/compaction. It will be used in low latency systems that need to scale well to a lot of clients, e.g. web servers.
I thought about an ...
0
votes
0
answers
138
views
Unbanked access, banked access and common memory access
What are they and what are their differences?
Unbanked access
Banked access
Common memory access
[EDIT]
This question is originated from my reading of MPLAB XC8 PIC Assembler User's Guide where the ...
0
votes
0
answers
187
views
Direct Mapped Cache, textbook excerpt clarification, identifying block field
I have an excerpt from my textbook concerning direct mapped cache that I would like further clarification on, the text reads.....
"Consider the following example: Assume memory consists of 2^14 ...
-2
votes
1
answer
736
views
Converting physical address to logical
In 8-bit address space there are 16 pages and the page table stores:
68792EA51BD3CF04 (hex)
The physical address is 39h, what is the corresponding logical address?
I have literally no idea what to ...