Skip to content
Snippets Groups Projects
Commit ca74ccea authored by KimWooJeong's avatar KimWooJeong
Browse files

assignment4 submit

parent a3c2ccde
Branches
No related tags found
No related merge requests found
......@@ -18,14 +18,11 @@ void* m_malloc(size_t size)
end = start;
}
if(end == start)
{
block = -1;
}
meta* nextblk = end;
end += size + sizeof(meta);
......@@ -40,7 +37,6 @@ void* m_malloc(size_t size)
block = nextblk;
printf("%d %d ",nextblk->free,nextblk->size);
......@@ -59,8 +55,6 @@ void m_free(void *ptr)
}
}
void* m_realloc(void* ptr,size_t size){
//GG
}
\ No newline at end of file
No preview for this file type
......@@ -13,6 +13,11 @@ int main(int argc,char* argv[])
int line_num; // 1,2,3,4,5
int fit_type=0;
if(argc!=2)
{
printf("!!!!!Usage: ./main input.txt\n");
return 0;
}
FILE* fp = fopen(argv[1],"r");
......@@ -39,7 +44,7 @@ int main(int argc,char* argv[])
return 0;
}
char** lines = (char**)malloc(line_num * sizeof(char*));
char** lines = (char**)m_malloc(line_num * sizeof(char*));
for(int i=0;i<line_num;i++)
{
......@@ -55,11 +60,6 @@ int main(int argc,char* argv[])
continue;
}
}
//for(int i=0; i<line_num;i++)
//{
// printf("%s\n", lines[i]);
//}
return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment