C gives you malloc
and free
, C++ adds new
, new[]
, delete
and delete[]
and the placement forms in addition to what C provides.
Anything more and you are out of the realms of the language proper. You are either treading in OS-land or murking in assembler. There is no question of such things being cross platform.
I am wondering what good would it do if such allocator existed?
You could implement your own malloc/free without worrying about the underlying OS
And you'd want another cross-platform solution to implement this and another ... you get the point. This is not a viable scheme.