1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Aleonysh [2.5K]
1 year ago
6

suppose a malloc implementation returns 8-byte aligned addresses and uses an explicit free list where the next and previous poin

ters are each 32-bits. blocks have a 32-bit header and 32-bit footer, where the low-order bit of the header and footer are used to indicate whether the block is allocated (1) or free (0). furthermore, the block size (which includes the header, payload, footer, and any necessary padding) is rounded up to the nearest multiple of 8, and this size (in bytes) is stored in the header and footer. assume any padding must be between the payload and the footer. if we call malloc(1), what block size will be allocated, in bytes?
Computers and Technology
1 answer:
Naya [18.7K]1 year ago
8 0

4 bytes because even if you call malloc and free a little more frequently, that might still occur. malloc frequently uses the extra space for managing (a linked list of all memory blocks and their sizes) when it takes a few bytes more than what is requested.

There is a good chance that you will tamper with the internal management structures and cause the subsequent malloc of free will to crash if you write some bytes either before or after your allocated block.

4004 because malloc internally always allocates at least four bytes. Your program would be 4000 if you added four bytes, making it 4004. may crash only when you access byte n+1. Additionally, the operating system typically only protects pages of memory.

Your process may be able to read-write the remainder of the page and will only crash when accessing the next memory page if your malloc-ed byte is in the middle of a page with a size of 512 bytes. But keep in mind: Even if this works, the behavior is not clear.

To learn more about internal management here

brainly.com/question/13398903

#SPJ1

Full Question = Suppose a malloc implementation returns 8-byte aligned addresses and uses an explicit free list where the next and previous pointers are each 32-bits. Blocks have a 32-bit header and 32-bit footer, where the low-order bit of the header and footer are used to indicate whether the block is allocated (1) or free (0). Furthermore, the block size (which includes the header, payload, footer, and any necessary padding) is rounded up to the nearest multiple of 8, and this size (in bytes) is stored in the header and footer. Assume any padding must be between the payload and the footer.

a) If we call malloc(1), what block size will be allocated, in bytes?

b) With the same conditions, and assuming we've already called malloc(1), if the heap used by malloc starts at address 0x4000 (16384 in decimal), what address would be returned if we then called malloc(32)?

You might be interested in
Which automated method for VPN connection deployment would work best in combination with Microsoft Intune or Microsoft Endpoint
maks197457 [2]

There are different kinds of automated method for VPN connection deployment. The automated method for VPN connection deployment would work best  is ProfileXML

  • ProfileXML is known to be often used as a delivery methods in Windows PowerShell, Microsoft Endpoint Configuration Manager, and Intune. For an individual to be able to use the ProfileXML VPNv2 CSP setting, one have to construct XML by using the ProfileXML schema.

An individual can configure the Always On VPN client by using the PowerShell, Microsoft Endpoint Configuration Manager, or Intune. They all need an XML VPN profile to configure the appropriate VPN settings.

Learn more from

brainly.com/question/25554117

3 0
2 years ago
You are unpacking and setting up workstations
Anestetic [448]

Answer:

For setting up workstations in classrooms, one end of cables connected into the built in NIC and other end will be connected to a drop.

Explanation:

A drop will be used for connectivity in this case, which will work as connection point in a network. Drops are just like outlets in wall having  Ethernet Jacks where a network device or system can be plugged into it.

8 0
3 years ago
Sal Kan earned $3,000.00, But he is only getting $1,585.00 on his pay check to
svetlana [45]

Answer:

Usually, it's because of taxes and insurance.

3 0
3 years ago
Which of the following does not make a good analysis class? (Points : 6) its name reflects its intent
satela [25.4K]

Answer:it has high coupling

Explanation: Coupling is the property in the field of computer program that is defined as the functions ,data and  codes of the program are dependent on each other and cannot be changed independently if requires. Thus,high amount of coupling is not considered as good factor due to high interdependence. Loose coupling can be still permitted.

Other options are correct because name of the class should reflect the purpose and well defined responsibilities should be present, modeling of certain component and high cohesion means keeping similar functions togather is also required. So, the only bad factor is high coupling

6 0
3 years ago
Cloud computing service providers manage different computing resources based on the services they offer. Which resources do IaaS
eimsori [14]

Answer:

1. C.operating system

2. A.applications

Explanation:

1. The Iaas is the infrastructure as a service, and storage, server, and network are the infrastructures. However, the Operating System is the platform, and hence it is the correct option for the first blank. We need to understand the exact meaning of the IaaS, PaaS and the SaaS as well as MaaS, to better understand cloud computing.

2. In the second case, we have been asked about the option that is not being covered by the PaaS, and Paas stands for the platform as a service. And the interface, storage, and virtualization is the platform whereas the Applications is an example of software. And it is being managed by SaaS, Hence, the correct option is A. Applications.

7 0
3 years ago
Other questions:
  • Today, air travel allows large numbers of people to move quickly over long distances. Which of the following is a likely effect
    8·1 answer
  • DSL technology is less efficient for service providers in the United States because many of their customers live in less-densely
    11·1 answer
  • The prediction that the number of transistors on a chip would double about every two years is known as ________. Metcalfe's law
    6·1 answer
  • A database interrogation is a major benefit of the database management approach, where end users can query (“ask”) the database
    6·1 answer
  • 33 points!!!!!!!!!!pls help
    15·1 answer
  • Select the answer that best describes the activity
    5·2 answers
  • Can anyone can tell me and explain me the answer of it please .<br>thanks
    9·1 answer
  • If two egg cells are fertilized what will happen?
    10·1 answer
  • Please select the word from the list that best fits the definition Asking for review material for a test
    14·2 answers
  • When can screentips be useful? when finding a tab when looking for a command when pinning the ribbon when using a command.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!