I can only conclude that someone does not know how to use the Exception handling.
If that's your logic, I have nothing but sympathy for you. I asked a simple question — how to allocate a block of data, and if it is impossible for any reason (e.g. there is not enough available free memory), the
nil must be returned, without any runtime errors and exception. This is a simple, specific and detailed question, but you prefer to make strange theories and impute ignorance to me, instead of answering the question (which I didn't expect anyway, because
@paweld already showed how to do it and I marked the topic as solved).
I wrote in the first sentence of the first post that I don't need it for anything — I'm just asking out of pure curiosity. Peace.