Hi! I checked your algorithm on a few examples and it does not work properly at all. That is, it does not free memory properly.
// CONSOLE OUTPUT
a:00293D34
b:00292D24
c:00292D10
d:00291D00 -> Here the address should be the same as for b
f:00291D00
// THE CODEint*a=(int*)mem_alloc(sizeof(int));int*b=(int*)mem_alloc(0x1000);int*c=(int*)mem_alloc(sizeof(int));std::cout<<"a:"<<a<<std::endl;std::cout<<"b:"<<b<<std::endl;std::cout<<"c:"<<c<<std::endl;mem_free(b);int*d=(int*)mem_alloc(0x1000);// here should be adress of B std::cout<<"d:"<<d<<std::endl;int*e=(int*)mem_alloc(sizeof(int));mem_free(d);int*f=(int*)mem_alloc(0x1000);std::cout<<"f:"<<f<<std::endl;
My professional interests are cloud and big data technologies, machine learning, and software development. I like to read source code and research papers to understand how stuff works.
Pronoun: He
My professional interests are cloud and big data technologies, machine learning, and software development. I like to read source code and research papers to understand how stuff works.
Pronoun: He
My professional interests are cloud and big data technologies, machine learning, and software development. I like to read source code and research papers to understand how stuff works.
Pronoun: He
My professional interests are cloud and big data technologies, machine learning, and software development. I like to read source code and research papers to understand how stuff works.
Pronoun: He
Hi! I checked your algorithm on a few examples and it does not work properly at all. That is, it does not free memory properly.
Hmmmm... I tested it a bit but didn't write any thorough unit tests. Do you know what's broken?
your
merge_current_node_into_previousfunction not returning anything when it suppose to returnvoid*Oops! Thanks! :) Feel free to submit a PR :)
how i new to this site
You can open a new PR on GitHub. You can find instructions how to contribute to GitHub projects on the internet, such as dataschool.io/how-to-contribute-on...
Let me know if you get stuck :)
hi, if I want to boot this in my old computer, i have to use the dd command to write the img in the hard disk, because that isn't working
Great! I always wanted to try it but was too lazy. What did you try exactly and what was the error?
I will try it again with an usb
What next paging?
merge_current_node_into_previous (mem.c):
Update void * to void in the function signature to resolve Clang warning about non-void function not returning a value.
Cleaner console output ;)