Originally Posted by
manasij7479
Hello again...
What I finally have is...[forgive a little C++ usage !]
void* mem[100]; //i.e std::array<void*, 100> mem; //inside the main struct/class of the virtual machine
Whenever a user application/function wants memory it can demand some with memalloc ..declared as
template<class T> T* memalloc(size); //which takes the void* just below the 'virtual' stack pointer and returns it as a T* capable of holding 'size' no. of T objects .
But I can't find a way to define memalloc without using malloc or new. Is it possible to do so ?