Did I create the malloc function correctly?
I would look on github, but I don't want code, I want slight tips so I actually learn.
size_t allocated = 0;
void malloc(size_t size)
{
allocated += size; //for free()
__asm__ __volatile__("push [esp+ %0]" : : "a"(size);
}
The idea is to push the stack pointer by the size of memory I give to malloc.
(Still working on asm, and inline asm, bare with me here)