Nt1310 Unit 8 Exercise 1

Improved Essays
//
// half_fit.c
// Half-Fit
//

#include
#include
#include "half_fit.h"
#include "type.h"
#include "math.h"

//unsigned char array[MAX_SIZE] __attribute__ ((section(".ARM.__at_0x10000000"), zero_init));
#define MEMORY 32768
#define BASE_ADDR (void*) 0x10000000 static header_free* buckets[11];

/* START Helper Functions
*/

// CEIL_32 Function
U32 CEIL_32 (U32 value) { // Re-adjust value to round up (or ceil) to nearest multiple of 32 return ((value-1)/32 + 1) * 32; // (e.g. 32->31->0->1->32, 196->195->6->7->224) // ^OPTIMIZE OPTION: USE BITWISE OPERATORS
}

// Function to calculate required size
U32 adjust_size(U32 initial_size) { // Add 4 bytes because of header size U32 newSize = initial_size + 4; // Re-adjust
…show more content…
0 : size/32;
}

// INSERT FUNCTIONS void insert_block(header_free* block) { header* alloc_block = (header*) block; int index = get_bucket_index(get_size(alloc_block)) - 1; // If block isn't the last one in the blocket if(get_next_free(block) != block) { // If block isn't the first one in the bucket either if(get_prev_free(block) != block) { // Connect neighbouring free blocks set_prev_free(get_next_free(block), get_prev_free(block)); set_next_free(get_prev_free(block), get_next_free(block)); } else { // Set the next block as the first one buckets[index] = get_next_free(block); set_prev_free(get_next_free(block), get_next_free(block)); } } else { if(get_prev_free(block) != block) { set_next_free(get_prev_free(block), get_prev_free(block)); } else { buckets[index] = NULL; } } // Separate block from others set_prev_free(block, block); set_next_free(block, block);
}

void insert_free_block(header_free* block)

Related Documents

  • Improved Essays

    1.7 III (b) VEGF: VEGF is also known as vascular permeability factor (VPF) is an endothelial cell specific mitogen in in vitro and is the main factor responsible for vasculogenesis and angiogenesis in a variety of in vivo models. The gene transcripts level of VEGF is stimulated at the time of implantation because process of implantation occurs under hypoxic condition. In rodents, VEGF is involved during embryo–endometrium crosstalk by regulating endothelial cell proliferation and vascular permeability of endothelial cells at implantation sites in rodents (Rabbani and Rogers, 2001; Rockwell et al., 2002). The VEGF’s mRNA and protein expression level has been noticed in endometrial stomal, endothelial, and glandular cells during the mid-secretory stage in the human (Charnock-Jones et al., 1993).…

    • 414 Words
    • 2 Pages
    Improved Essays
  • Improved Essays

    Sara Ann Thornley 2/3/17 Macronutrients Dr. Huggins Assignment #1 1. A reducing sugar is a sugar that is capable of breaking down certain substances. They have a free ketone or aldehyde group which allows them to become hemiacetale and hemiketals (Gropper, 65).…

    • 528 Words
    • 3 Pages
    Improved Essays
  • Improved Essays

    On october 12, 2015 at or about 1102 hours i was dispatched to 1735 east young circle (publix supermarket), hollywood florida, in reference to a cellphone being taken. Upon further investigation it was later found that the cellphone would equal the amount to grand theft (over $300.00usd). Let it be also noted during the time of this investigation, i was working an off-duty detail at the above location. Upon arrival i made contact with the james othman, herein after referred to as the victim. The victim advised me that at approximately 1051 hours his phone was taken from the customer service counter (located at the south side of the store).…

    • 587 Words
    • 3 Pages
    Improved Essays
  • Decent Essays

    Due to the age of the existing equipment, four new Cisco Catalyst 3560 V2 24 port switches will be use and configure for network redundancy by connecting each switch in a multiple links, single IP address with routing protocol Border Gateway Protocol (BGP). This multi-homing will detect when one of the links fail and not send traffic over that link anymore until the issue is resolved. This redundancy configuration will meet Western County Bank management requirement reducing unplanned outages and regular maintenance performed on the network equipment supporting 10 GB links as well as static or LACP-based (link aggregation control protocol) network interface controller (NIC) teaming. The Time Warner Cable, Business, Dedicated Internet Access, and AT&T Uverse Business Internet service will provide redundancy to the Internet…

    • 452 Words
    • 2 Pages
    Decent Essays
  • Improved Essays

    Ilab 5 jerry Metcalf Keller Graduate School of Management Professor: Gregory Gleghorn 6/4/2017 VPN Connection The type of VPN connection solution that we will be using to connect user to the internet work will be the Cisco Any connect client and the RSA secureID. We will be going in to detail of how the connection process goes and also how to configure it. Both clients are required in order for the user to authenticate and connect to the company network. When the user is connected they will be able to do their job remotely and send and retrieve information remotely.…

    • 678 Words
    • 3 Pages
    Improved Essays
  • Decent Essays

    Implementing Firewall Filter Implementing firewall filters on a network makes the network free from attackers and very secured. Some of the boundaries that I will consider using on my firewall will be blocking ports on the network. First of all I will establish a new FTP session which the will initiate a connection to an FTP server that listens on TCP port 21 by default. This will help users on the network to login with user name and password before any data to port 21 will accepted. I will establish SSH(secure shell) which will provide a strong and secure communications over the network.…

    • 441 Words
    • 2 Pages
    Decent Essays
  • Improved Essays

    Nt1310 Unit 3 Assignment 3

    • 1039 Words
    • 5 Pages

    Group I, Category 19 Incorrect RFC Decision ISSUE DDS proposed a denial determination. The evidence in file supports a more restrictive RFC, as a result, additional vocational documentation is required. CASE DISCUSSION & POLICY ANALYSIS (INCLUDING SPECIFIC REFERENCES) This 57-year old is filing a DIB claim alleging disability due to loss of right eye, COPD, high blood pressure, edema of both legs and feet, back surgery, weight gain, depression, and neuropathy, as of 10/22/2014.…

    • 1039 Words
    • 5 Pages
    Improved Essays
  • Decent Essays

    Policy-based management: SQL server has a feature called policy-based management which is used to define and also implement policies in SQL server. It is used if we want to apply any policy against a table or database and then checks whether the database or table satisfies with the given policy. If target database objects are not satisfied with the policies then either a trigger should be fired or we can enforce it so that an administrator will come to know that there is some policy violation. It will manage one or more instances of SQL server.…

    • 391 Words
    • 2 Pages
    Decent Essays
  • Superior Essays

    Introduction The current information technology (IT) infrastructure consists of a mix of 2008 and 2008 R2 servers, with two legacy Windows 2000 servers, and four Windows Server 2012. In addition to the Windows server environment, the network consists of routers, switches, and security appliances, such as firewalls. The environment also consists of important services to ensure the security, and stability of the network.…

    • 922 Words
    • 4 Pages
    Superior Essays
  • Improved Essays

    WSUS is a Windows Server Update Service, that allows the administrators to have a server with Windows updates on site. Administrators can test new updates and approve the successfully tested Windows updates for release. Only the approved updates will be applied to the client computers. Using Group Policy, the administrators can point client computers to WSUS server, so the client computers will only receive the tested and approved updates from this server, instead of receiving all the updates (including potentially harmful updates) from the Windows update web site. This assures, that none of the new Windows updates will create unexpected issues with the clients' systems.…

    • 572 Words
    • 3 Pages
    Improved Essays
  • Improved Essays

    Elisha, for the month of April you scored 7.6 points per hour. Your current yearly average is 7.3 points per hour. The team average for the month of April was 9.2 points per hour and the department average for the same month was 9.2 points per hour. Elisha, you continue to perform well below the department expectations in productivity month-over-month. As stated before this cannot continue.…

    • 407 Words
    • 2 Pages
    Improved Essays
  • Decent Essays

    SIP Trunking BroadConnect boasts its many years of experience and emphasis on customization. We take every business and design the best phone systems content for it, based on your needs and budget. Since we understand that communication is a major component of a successful business, you will never receive excessive or useless features that will only hinder your company’s ability to grow. Our network is prevalent throughout North America, and it uses converged T1 that is fast and reliable.…

    • 480 Words
    • 2 Pages
    Decent Essays
  • Decent Essays

    Professor Doupé, Thank you for your reply, and for your questions. We are excited to potentially have your guidance in our research, and hope we have provided clear explanations to your questions below: 1. SSL/TLS encryption secures data flowing between client and server. Using SSL during an authentication attempt could provide a secure way for a non malicious server to authenticate with the device, while blocking out sign in attempts from malware. 2.…

    • 682 Words
    • 3 Pages
    Decent Essays
  • Decent Essays

    Nt1330 Unit 1 Exercise 1

    • 294 Words
    • 2 Pages

    Exercise 1: GroceryList or PartyList As a user, I need two columns so that I can move what I have from a have columns and know what I sill need. As a user, I need to add items directly to either column so that I can accurately keep track of items. As a user, I need to delete all items from the list so that I can quickly start a new one.…

    • 294 Words
    • 2 Pages
    Decent Essays
  • Improved Essays

    The block was made to pass through the structures in the orientation shown in Figure 1. The project aims for both these models to be as…

    • 2637 Words
    • 11 Pages
    Improved Essays