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
13) An-Excel-file-is-generally called-a-l-an:
anzhelika [568]

Answer:

b) worksheet

Explanation:

An excel file is generally called a worksheet.

5 0
3 years ago
A Unit of information containing the objects position, rotation, and scale values is called:
Paraphin [41]

The answer is:

B) A transform.



5 0
3 years ago
A barcode is a Select one: a. coded instruction needed to control computer hardware. b. confidential computer code required by H
kolezko [41]

A bar code is a  series of bars and spaces representing numbers or letters.

<h3><u>Explanation:</u></h3>

A method that is used for the purpose of representing a data in the form of a picture or image that can be easily understood by the machine. It consists of many lines that has different widths and spaces. They either represent the letter or a number. These are mainly used for the representation of data in the machine understandable format.

For example an UPC-A bar codes has 12 numbers. The numbering system is represented by the first digit. The manufacturer will be represented by the next five digits in it. The product will be represented by the five digits following it. Check digit is represented in the last digit.

5 0
3 years ago
What is the management part of a dashboard?
Stolb23 [73]

Answer:

 The management dashboard is the visual and display the KPI ( Key performance indicator) and metrics for monitoring the specific process and department.

It is basically used for checking whether the organization achieve or meet its specific goals not as per the requirement of the particular department in the organization.

The main part of the management dashboard is that it provide the visibility and alignment in the particular organization so that it meets according to the requirements of the organization. The basic requirement in the organization are:

  • Business user
  • Organization needs
  • Information technology (IT) needs

7 0
3 years ago
Please explain what steps you will take to prevent hackers from getting access to your personal information.
yuradex [85]
The steps I would take are 1. Making a strong password with symbols and numbers. 2. I will set up a 2 way authentication ther for if someone would be trying to hack me I would get an alert in order to stop the attempt. 3 I will not use the same password each time.
4 0
3 years ago
Other questions:
  • What is a way to minimize technical problems with computer
    13·1 answer
  • What steps should a user take to create a secondary address book?
    8·2 answers
  • Science can give us
    5·2 answers
  • You are comparing cryptographic solutions to implement at your organization. Which two items should you focus on when you are ev
    12·1 answer
  • Open the NetBeans IDE and create a new project named MySizes.java. Your program should do the following:
    9·1 answer
  • When hacking a website to test a secure connection and ensure internet safety, what is a good way to check the coding of the web
    14·1 answer
  • A company database needs to store information about employees (identified by ssn, with salary and phone as attributes), departme
    7·1 answer
  • How would you describe binary to someone ??<br> PLEASE ANSWER I WILL GIVE U BRAINLY!!
    15·2 answers
  • An MP3 player is an example of which of the following types of computer
    5·1 answer
  • You have been on the phone with a user in a remote office for 30 minutes troubleshooting their minor desktop problem. No matter
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!