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
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 :)
ok so is my answer is the right answer about whats broken
I don't know but if you make a PR / try it out we can test it :)
is there a private chat feature
I followed you so we can use dev.to/connect or you can hit me up on Twitter :)