M
M
mafia82019-08-25 14:50:53
RAM
mafia8, 2019-08-25 14:50:53

How does the program know if a piece of memory is occupied or free?

How does the program know if a piece of memory is occupied or free?
For example, in a C program, the malloc function allocates memory and returns a pointer to a piece of memory.
I mean a piece of memory in the address space of the program, and not the address on the physical memory module.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ronald McDonald, 2019-08-25
@Zoominger

The program does not learn anything and should not, the OS allocates memory.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question