3 ms·
> there may not even be an operating system the program was run on. Sure, in this case you can just implement malloc the same way a kernel implements me. My fa
by l33t233372 4y ago
> there may not even be an operating system the program was run on.
Sure, in this case you can just implement malloc the same way a kernel implements me. My failure of understanding is when there _is_ a kernel that your program needs to interact with.
- wongarsu 4y agoIn the executable file you can specify that the operating system should give you a writable space of a given size, initialized with whatever you want. I think that's frequently used to initialize static variables, so you might get the desired result by just telling the compiler you want a large static array.