| > That doesn't make sense; the OS itself is written in C. Please point to a non-userspace memory allocation library/implementation that does not rely on lower level logic to function. > Okay, so we're back to, C doesn't impose anything on you, though the OS may. You're just reversing the original statement. The statement was "you can't assume anything about memory in C" (paraphrasing). They then asked "why not?" The explanation is that: What you think is 'memory' in C isn't, and certainly doesn't map to what most people assume about memory; because C doesn't impose a memory model, it relies on the underlying OS/environment to do so. The only "memory model" is thus: a requested allocation (whether on the stack or heap), if provided to you, will match your request; all other assumptions are invalid. If you want to move goalposts, argue about logical boundaries, etc, have at it. Or if that answer doesn't satisfy you, I don't know what to tell you; but simply rephrasing the original problem does even less. |