From 51c2bfa36dee50eaf818cb084550f6e0863ac4e5 Mon Sep 17 00:00:00 2001 From: HyukSang Kwon <ckai22@ajou.ac.kr> Date: Tue, 29 May 2018 13:10:30 +0900 Subject: [PATCH] Update README.md --- README.md | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/README.md b/README.md index e69de29..649ee61 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,73 @@ + +Operating system Assignment 4 +=================== + +TA Info & Assignment URL +--- + +- TA Mail: ckai22@ajou.ac.kr +- TA gitlab: http://git.ajou.ac.kr/ckai22 + +File Info +--- +- **main.c**: Implements input and output +- **alloc.h**: Implements meta structure +- **alloc.c**: Implements malloc, free, and realloc +- **Makefile**: compiles the project +- **input** directory: saves the input file + +TEST +--- +##### Test proceeds as follows. +- - - +1. Input File name to the main function parameter. +2. Read File (File IO) +3. Interpret commands in File +4. Output to stdout + +##### **Command structure in File** +- - - +> "Number of command lines" "Fit" +"Command" "Contents" +"Command" "Contents" +... + +##### **Fit type (case sensitive)** +- - - +>F: first fit +B: Best fit +W: worst fit + +##### **Command type** +- - - +>**s** String: String The command to put the value into +**f** n: nth allocation area free +**r** n m: reallocation with m bytes in the nth allocation area +**e** n: Allocate space without contents to n bytes + +##### **Output** +- - - +> “Free" "size" "content (if command is m only)" +"Free" "size" "content (if command is m only)" +... + +##### **Example** +- - - +>E1) +**Input** +3 F +m Think like a man of action and act like man of thought. +m Courage is very important. Like a muscle, it is strengthened by use. +m Life is the art of drawing sufficient conclusions from insufficient premises. +**Output** +0 56 Think like a man of action and act like man of thought. +0 72 Courage is very important. Like a muscle, it is strengthened by use. +0 80 Life is the art of drawing sufficient conclusions from insufficient premises. + +>E2) +**Input** +2 F +m Think like a man of action and act like man of thought. +f 0 +**Output** +1 56 -- GitLab