Questions tagged [memory-allocation]
The memory-allocation tag has no summary.
85 questions
1
vote
1
answer
160
views
Should "16MB × 64-bit DRAM" be interpreted as Mega-Bytes or Mega-Words?
In a DRAM architecture problem, I’m given:
DRAM: 16MB × 64-bit
DRAM chip: 512KB × 4-bit
My professor repeatedly referred to these as Mega-Bytes and Kilo-Bytes, but ...
1
vote
1
answer
87
views
File allocations methods
I was solving a problem that was asking me to use the 3 different types of allocations, contiguous, linked list and index allocations. I then got a list of different files with different sizes and was ...
3
votes
1
answer
1k
views
How to allocate memory in NASM without C functions (x64)?
So I'm using NASM on linux and I was curious how this is done. All the info I can find online uses functions from C like malloc(). Can this be done purely with assembly code? Perhaps via a system call?...
0
votes
1
answer
273
views
RAM architecture vs. CPU architecture
I have learned that initially PCs had 8-bit memory architecture and that 1 byte (i.e. 8 bits) was the "basic" memory unit because 8 bits was exactly the memory space required to encode any ...
2
votes
1
answer
79
views
Problem with cache and memory from university class
In my university class, I received this homework assignment on computer architecture, but I don't know how to solve it. I already know that the correct answer is 0, but I don't understand why. Could ...
1
vote
2
answers
96
views
strip packing problem with fixed x-coordinate
Similar to the classic 2D strip packing problem, we want to put N blocks into a 2d strip and minimize the height of the strip. Each block has to be put at the fixed x-coordinate. The width and height ...
0
votes
0
answers
49
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
2
answers
214
views
How does a CPU jump to a instruction thats no longer in ram?
Im designing my own CPU but I don't know how it jumps to an instruction that's no longer in ram. People have told me it puts the address in the SSD but for example, if the address were 3 in ram it ...
1
vote
1
answer
150
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 ...
-1
votes
3
answers
3k
views
Why does a 32 bit address only contain 1 byte, when 32 bits = 4 bytes?
I am really confused about it. I think 32 bits = 4 bytes but 32 bit address is only 1 bit.
0
votes
3
answers
150
views
Does the computer change the content of the virtual adress
My book(digital design and computer architecture ARM edition) explains loads and stores like this:
To perform a load or store, the processor must first translate the
virtual adress to a physical ...
0
votes
2
answers
222
views
Are variables stored again in RAM?
Assuming this set of instructions:
declare variable 'A' which has value 5
declare variable 'B' which has value 2
From what I've understood, those instructions are loaded into RAM an then read by CPU,...
3
votes
1
answer
866
views
Buddy system allocator and slab allocator in Linux kernel
In the Silberschatz's book "operating systems" the author talks about the allocation of memory via system buddy and slab.
My first question is: in the book, both memory allocation methods ...
0
votes
1
answer
108
views
Bitvector for Memory Allocation
Lets say a system has 1TB of memory and 4kB blocks. How many MB of memory do we need if we want to store a bitvector to represent the current memory allocation situation with a bitvector?
Bitvector: a ...
1
vote
2
answers
233
views
Realistic model of memory allocation/deallocation cost
When doing complexity analysis, they never account for the costs of memory allocation/deallocation on the heap. In particular, this is the case for the announced complexities of the operations on ...